sensor:
- platform: template
sensors:
water_heater_power:
value_template: "{{ states('sensor.212a01_cloud_xxxxx_power')|float * 100 }}"
unit_of_measurement: "W"
friendly_name: Water Heater Current Power
- platform: integration
source: sensor.water_heater_power
name: Water Heater Energy Spent
unit_prefix: k
round: 2
method: left
sensor:
- platform: template
sensors:
water_heater_power:
value_template: "{{ states('sensor.212a01_cloud_066229_power')|float * 100 }}"
unit_of_measurement: "W"
friendly_name: Water Heater Current Power
- platform: integration
source: sensor.water_heater_power
name: Water Heater Energy Spent
unit_prefix: k
round: 2
method: left
我也是刚接触HA,没太看明白你的意思?
你修改完YAML文件后,保存,重启HA服务。
然后在“开发者工具”中,能不能搜索到Water Heater Current Power和Water Heater Energy Spent这两个自定义创建的实体?
也可以直接在“概览”中直接添加这两个实体,查看是否有数据。