其实,只要把原有的实体加点参数,就能用那个能源面板了。特别是单位,大小写都不能变。
- platform: mqtt
name: "Electricity total used"
state_topic: "tele/sonoff/SENSOR"
value_template: "{{value_json['ENERGY'].Total }}"
unit_of_measurement: "kWh"
last_reset_topic: "tele/sonoff/SENSOR"
last_reset_value_template: "{{ value_json['ENERGY'].TotalStartTime }}"
qos: 1
state_class: 'measurement'
device_class: 'energy'
|