getLightRhythmsTimeInfo(data: CommonLonLatParams)
Requires:
@tuya-miniapp/cloud-api≥1.0.5
Description
Get sunrise and sunset times and return them in the device or group's time zone.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | Request parameters: bizId (business ID), bizType (business type: 0 = device, 1 = group), lon (longitude), lat (latitude). |
Return Value
Type: Promise<GetLightRhythmsTimeInfoResult>
TimeInfo[]; fields: date (date, format yyyyMMdd), sunrise (sunrise time), sunset (sunset time), transitAtNoon (noon time), dawn (pre-sunrise time), dusk (post-sunset time)
Referenced Types
type
GetLightRhythmsTimeInfoResultValid Values
CommonLonLatParams.bizType
| Value | Description | Since |
|---|---|---|
0 | - | - |
1 | - | - |
Examples
Request example
Response example
FAQ
Why does the biological rhythm cloud capability call fail?
Biological rhythm must have advanced capabilities enabled on the Tuya Developer Platform product feature definition page. Otherwise cloud capability calls will fail.