## General-Countdown

### Function Introduction
- The countdown can set the time after which the current light turns off or on.
  - If it is currently on, it will turn off after the set duration.
  - If it is currently off, it will turn on after the set duration.
### DP protocol
| DP code | DP meaning | DP type | Remarks |
| -------- | ------- |------- |------- |
| countdown | countdown | value | 0 - 1440 |

### How to develop

- Monitor, report and send DP according to UI interaction
  - [Specific monitoring and sending examples](/en/miniapp/solution-panel/ability#device-function-point-management)

### Notes
- In what cases will the countdown function be canceled (cleared)?
  1. The countdown DP sent by the panel is 0 (that is, the countdown is canceled through the clear button in the control panel or the countdown time is reset to 0 hours and 0 minutes);
  2. During the countdown execution period, the device on/off status changes, including local device button control, App panel remote control, timed control execution, etc.;
  3. The device is powered off and then powered on again or the module is restarted.
- What is the countdown reporting time interval? It is not real-time reporting, and the panel needs to count down by itself, so there may be a 30s error on the panel. The device countdown is normal.
  1. Wi-Fi+BLE: 30S

### Related materials
- [Function page]:
  1. [Countdown function page](https://developer.tuya.com/material/library_oHEKLjj0/component?code=LampScheduleFunctional)
- [Component]:
  1. [Countdown component](https://developer.tuya.com/material/library_oHEKLjj0/component?code=ComponentsTyLamp&subCode=LampModuleSchedule)
  2. [Countdown pop-up component](https://developer.tuya.com/material/library_oHEKLjj0/component?code=CountdownActionSheet)
- [Tutorial]: 
  - None
- [SDK]: 
  - None
- [API]: 
  - None