在homeassistant中,自带的图标效果并非所爱。我们可以通过安装第三方卡片的形式展现图表。

接下来,我们在HACS中搜索并安装apexcharts-card
插件。

安装完成后,添加对应卡片。

添加完成后。编辑相应的代码。

几个核心参数:
header: #配置标题
show: true #显示标题
title: 逍遥子大表哥 #标题名称
show_states: true #标题状态
colorize_states: true #标题颜色
实体配置:
series:
- entity: sensor.temp02_temperature #实体名称
type: column #实体类型 默认为线,column为柱
如果你想配置多条线。你可以配置添加多个- entity:
即可。
一个完整的示例:
type: custom:apexcharts-card
header:
show: true
title: DHT11设备
show_states: true
colorize_states: true
series:
- entity: sensor.temp02_temperature
group_by:
func: last
duration: 5m
stroke_width: 2
show:
extremas: true
header_color_threshold: true
color_threshold:
- value: 18
color: steelblue
- value: 21
color: midnightblue
- value: 22
color: orange
- value: 23
color: orangered
- value: 26
color: red
- entity: sensor.humidity_humidity
group_by:
func: last
duration: 5m
stroke_width: 2
show:
extremas: true
header_color_threshold: true

当然,还支持其他效果的展示,下面是官方的几个例子。



更多精彩文章 欢迎关注我们
原文始发于微信公众号(kali笔记):在homeassistant中配置个性化图表上手指南
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/310821.html