---
name: "getAstronomicalList"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.5.2" }
title: "getAstronomicalList - Get Astronomical Timer List"
---

## getAstronomicalList

> [VERSION] @ray-js/ray >= 1.5.2

### Description

Get the astronomical timer list

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `params` | `IGetAstronomicalList` | Yes | Request parameters |

### Return Value

Type: `Promise<IGetAstronomicalListResponse>`

Array of astronomical timers

##### IGetAstronomicalListResponse

| Property | Type | Description |
| --- | --- | --- |
| `astronomicalType` | `number` | Sunrise/Sunset type |
| `bizId` | `string` | Device or group ID |
| `bizType` | `number` | Resource type. 0: single device. 1: group device. |
| `dps` | `string` | DP value |
| `id` | `number` | Timer task ID |
| `lat` | `number` | Longitude |
| `lon` | `number` | Latitude |
| `loops` | `string` | Weekly recurrence |
| `nextSunSet` | `string` | Next sunrise time |
| `offsetType` | `number` | Timer offset execution type |
| `status` | `number` | Timer status: 0 off, 1 on, 2 invalid/deleted |
| `time` | `string` | Scheduled time |
| `timezone` | `string` | Time zone |

### Referenced Types

##### `interface` IGetAstronomicalList

| Property | Type | Description |
| --- | --- | --- |
| `bizId` | `string` | Device ID or group ID |


### Examples

#### Basic usage

```ts
import { getAstronomicalList } from '@ray-js/ray';

getAstronomicalList({
  bizId: 'vdevo160456552237748',
}).then((response) => {
  console.log('Astronomical timer list:', response);
}).catch((err) => {
  console.error(err);
});
```
