中国地区临近天气预报
方法1: HACS (点击这里安装)
下载 解压并复制
custom_components/hass-weathercn-minute
文件夹到HA配置目录下的custom_components
文件夹内
配置 > 设备与服务 > 集成 > 添加集成 > 搜索 "临近天气预报"
雷达降雨量可视化(使用 ApexCharts Card)
type: custom:apexcharts-card
header:
show: true
title: 临近降水预报
graph_span: 2h
span:
start: minute
apex_config:
chart:
height: 150px
series:
- entity: sensor.minute_summary
data_generator: |
const start_at = new Date(entity.attributes.start_at)
return entity.attributes.values.map((entry, index) => {
const time = new Date(start_at.getTime() + index * 5 * 60 * 1000);
return [time, entry];
});
type: area
show:
in_header: false
更多可视化(使用 ApexCharts Card + Mushroom + vertical-stack-in-card)
type: custom:vertical-stack-in-card
horizontal: true
cards:
- type: custom:mushroom-entity-card
entity: sensor.minute_summary
- type: custom:apexcharts-card
header:
show: false
title: 临近降水预报
graph_span: 2h
layout: minimal
span:
start: minute
now:
show: true
color: red
apex_config:
chart:
height: 60px
series:
- entity: sensor.minute_summary
data_generator: |
const start_at = new Date(entity.attributes.start_at)
return entity.attributes.values.map((entry, index) => {
const time = new Date(start_at.getTime() + index * 5 * 60 * 1000);
return [time, entry];
});
type: area
show:
in_header: false