Set Sunrise and Sunset Time
Function: support_set_weatch_sun_time_0a_06 (C library JSON ID, SDK to be supplemented)
Flutter Example:
/// Set sunrise and sunset time event number
setWeatherSunTime(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.app_weatcher_set_sun_time),
/// Set sunrise and sunset time
libManager.send(evt: CmdEvtType.setWeatherSunTime, json: jsonEncode(json));
JSON Fields Sent by the App:
| Field Name | Field Type | Field Description |
|---|---|---|
| sunrise_hour | int | Hour of sunrise |
| sunrise_min | int | Minute of sunrise |
| sunset_hour | int | Hour of sunset |
| sunset_min | int | Minute of sunset |
Example:
{
"sunrise_hour": 6,
"sunrise_min": 12,
"sunset_hour": 18,
"sunset_min": 30
}
JSON Fields Received by the App:
| Field Name | Field Type | Field Description |
|---|---|---|
| is_success | int | 0 for failure 1 for success |
Example:
{
"is_success": 1
}