11
260
3105
论坛元老
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
407
1658
金牌会员
bugensui 发表于 2023-5-9 11:17 这样分开写的区别在哪里,有什么好处呢
5
56
472
中级会员
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-5-14 19:36 , Processed in 0.075175 second(s), 21 queries .
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.