pauillac21 发表于 2021-12-24 12:11
没太明白,你是想要 {{( 2-(state | float / 100) )| round(2)}}
wfx 发表于 2021-12-24 12:21
{{( 200-(state('sensor.tasmota_sr04_distance') | float / 100) )| round(2)}} 这样也不对!
pauillac21 发表于 2021-12-24 12:24
你直接用: {{ ( 2-(states('sensor.tasmota_sr04_distance') | float / 100) )| round(2) }} ,前面那个2 ...
wfx 发表于 2021-12-24 13:28
还是不可用!
Tao173 发表于 2021-12-24 15:32
esphome可以直接计算好然后发送到HA,不需要自己写模版
欢迎光临 『瀚思彼岸』» 智能家居技术论坛 (https://bbs.hassbian.com/) | Powered by Discuz! X3.5 |