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').temperature| round(0)}}" bugensui 发表于 2023-5-9 11:17
这样分开写的区别在哪里,有什么好处呢
防止configureation.yaml文件太大,找东西麻烦,这样写传感器就到传感器的文件里找,模板就到模板的文件里找。 请教一下,这个“templow: 6” 想在ESPHome直接调用应该怎么写呢?
页:
1
[2]