tangxingjie1991 发表于 2022-4-9 14:22:35

分享一个油价的nr流

升级到2022.4的小伙伴会发现原来的油价插件不能用了,故有了下面的nr流程,数据来源和原来的插件一样




Markdown的写法要稍作修改
<ha-icon icon="mdi:update"></ha-icon> {{ states.sensor.youjia.last_changed.strftime('%Y-%m-%d') }}
## <center>92# <ha-icon icon="mdi:gas-station"></ha-icon><font color=#ea4335> {{ state_attr('sensor.youjia', '92')}} </font>               95# <ha-icon icon="mdi:gas-station"></ha-icon><font color=#fbbc05>{{ state_attr('sensor.youjia', '95')}} </font> <p> 98# <ha-icon icon="mdi:gas-station"></ha-icon> <font color=#4285f4>{{ state_attr('sensor.youjia', '98')}}</font>                  0#柴<ha-icon icon="mdi:gas-station"></ha-icon> <font color=#34a853>{{ state_attr('sensor.youjia', '0')}} </font></center>
- {{ states('sensor.youjia') }}
- {{ state_attr('sensor.youjia','tips')}}






georgewu57 发表于 2022-4-9 15:06:45

感谢楼主分享!!!

dscao 发表于 2022-4-9 16:29:42

感谢分享!不过2022.4我这除了风扇类的插件有些要升级有些要修改点代码,其它一切正常。

jjcs 发表于 2022-4-9 17:10:47

l论坛有你更精彩

wy_112206 发表于 2022-4-9 17:32:14

流程导进去没有用啊。

nichwang 发表于 2022-4-9 18:34:37

楼主给力

tangxingjie1991 发表于 2022-4-9 18:47:20

dscao 发表于 2022-4-9 16:29
感谢分享!不过2022.4我这除了风扇类的插件有些要升级有些要修改点代码,其它一切正常。 ...

我也是风扇有问题,等作者更新了,我有用到油价就自己整了个

tangxingjie1991 发表于 2022-4-9 18:48:26

wy_112206 发表于 2022-4-9 17:32
流程导进去没有用啊。

需要安装一个Node-RED Companion去hacs里面安装

skasoka 发表于 2022-4-9 18:54:24

感谢!一直没敢升级到4.0,这下无所顾忌了

wy_112206 发表于 2022-4-9 19:03:53

tangxingjie1991 发表于 2022-4-9 18:48
需要安装一个Node-RED Companion去hacs里面安装

装过了,那流程直接导入就能用吗,要改啥吗
页: [1] 2 3 4 5 6 7 8 9 10
查看完整版本: 分享一个油价的nr流