getWeatherDailyHistory(data: GetWeatherDailyHistoryParams)
版本要求:
@tuya-miniapp/cloud-api≥1.0.5
描述
根据设备 id 查询历史天气
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| 是 | 请求体 |
返回值
类型:Promise<Record<string, Weather>>
GetWeatherDailyHistoryResult(键为 YYYY-MM-DD 日期字符串,值为该日 Weather 对象;字段含义见类型定义与 minituya 返回参数)
引用对象
interface
Weather单日天气字段集合:`date`、`localDate` 与文档一致;其余键为请求的 `weatherFieldNames` 对应取值。| 属性 | 类型 | 描述 |
|---|---|---|
date | string | formatDate,例如 2023-10-24 |
localDate | number | 时间戳,例如 1698076800000 |