11
271
3099
论坛元老
sensor: - platform: template sensors: tempnows: friendly_name: "当前温度" unit_of_measurement: "°C" value_template: "{{state_attr('weather.localweather', 'temperature' )| round(0)}}" - platform: template sensors: temphight: friendly_name: "次日温度高" unit_of_measurement: "°C" value_template: "{{state_attr('weather.localweather', 'forecast')[0].temperature| round(0)}}"
使用道具 举报
45
452
1639
金牌会员
bugensui 发表于 2023-5-9 11:17 这样分开写的区别在哪里,有什么好处呢
5
61
466
中级会员
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|Hassbian
GMT+8, 2024-11-25 07:24 , Processed in 0.095342 second(s), 23 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.