---
name: "getLightRhythmsTimeInfo"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## getLightRhythmsTimeInfo

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

> 💡 该接口为云能力，需开通授权后使用，关于云能力可[查看文档](/cn/miniapp/common/desc/tech-stack/api) 目前云能力在 开发者工具环境无法使用，需要打包后或真机调试使用。

### 描述

获取日出日落时间，并以设备或群组所在时区输出。

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `data` | `CommonLonLatParams` | 是 | - | 请求参数：bizId（业务 ID）、bizType（业务类型，0：设备 1：群组）、lon（经度）、lat（纬度） |

### 引用对象

##### `interface` CommonLonLatParams

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `bizId` | `string` | 业务 ID |
| `bizType` | `0 \| 1` | 业务类型 |
| `lon` | `string` | 经度 |
| `lat` | `string` | 纬度 |


### 示例代码

#### 请求示例

```typescript
import { getLightRhythmsTimeInfo } from '@tuya-miniapp/cloud-api';

getLightRhythmsTimeInfo({
  bizId: 'vdevo167504******003',
  bizType: 0,
  lon: '112.233',
  lat: '30.233',
})
  .then((response) => {
    console.log(response);
  })
  .catch();
```

#### 返回示例

```json
[
  {
    "date": "20231020",
    "sunrise": "22:35",
    "dusk": "10:25",
    "transitAtNoon": "04:15",
    "sunset": "09:55",
    "dawn": "22:05"
  }
]
```
