|
发表于 2022-6-4 15:20:08
|
显示全部楼层
Core 2022.5.5 已解决
具体操作:
1.下载、安装修改版:https://github.com/maxmib/OilPrice_hass_plugin
2.configuration.yaml添加以下:
sensor:
- platform: oilprice
name: oilprice
region: guangdong
3.hass-仪表盘-添加卡片-markdown添加以下代码(检查是sensor.oilprice):
<ha-icon icon="mdi:update"></ha-icon> {{ states.sensor.oilprice.last_changed.strftime('%Y-%m-%d') }}
## <center>92# <ha-icon icon="mdi:gas-station"></ha-icon> <font color=#ea4335> {{ state_attr('sensor.oilprice', '92')}} </font> 95# <ha-icon icon="mdi:gas-station"></ha-icon> <font color=#fbbc05> {{ state_attr('sensor.oilprice', '95')}} </font> <p> 98# <ha-icon icon="mdi:gas-station"></ha-icon> <font color=#4285f4> {{ state_attr('sensor.oilprice', '98')}}</font> 0#柴<ha-icon icon="mdi:gas-station"></ha-icon> <font color=#34a853> {{ state_attr('sensor.oilprice', '0')}} </font></center>
- {{ states('sensor.oilprice') }}
- {{ state_attr('sensor.oilprice','tips')}}
|
评分
-
查看全部评分
|