How I made sensors that report in W (Watts) work in Energy Dashboard
Now I just need my Aeotec zigbee power monitoring smartplug (that come into HA via MQTT) to be listed as an individual device…
They show like this in Dev:
unit_of_measurement: W
friendly_name: Smart Plug - Back Lounge power
device_class: power
I might try making a template sensor and see if I can get that to work.
OK… I now have this in my configuration.yaml… let’s see if it works (I know a little but not enough so probably wrong somewhere). I can and have added them to individual devices…
UPDATE: Overly complicated. Integration Sensors can be added straight to the dashboard if setup correctly. Instructions updated.
sensor:
#Integration Sensors
- platform: integration
source: sensor.smart_plug_back_lounge_power
name: Smart Plug Back Lounge Energy Spent
unit_prefix: k
round: 2
method: left
- platform: integration
source: sensor.smart_plug_front_lounge_power
name: Smart Plug Front Lounge Energy Spent
unit_prefix: k
round: 2
method: left
- platform: integration
source: sensor.smart_plug_front_door_power
name: Smart Plug Front Door Energy Spent
unit_prefix: k
round: 2
method: left
- platform: integration
source: sensor.smart_plug_pool_filter_power
name: Smart Plug Pool Filter Energy Spent
unit_prefix: k
round: 2
method: left
then add this to customize.yaml :
sensor.smart_plug_back_lounge_energy_monitor:
last_reset: '1970-01-01T00:00:00+00:00'
state_class: 'total_increasing'
device_class: energy
unit_of_measurement: kWh
sensor.smart_plug_front_lounge_energy_monitor:
last_reset: '1970-01-01T00:00:00+00:00'
state_class: 'total_increasing'
device_class: energy
unit_of_measurement: kWh
sensor.smart_plug_front_door_energy_monitor:
last_reset: '1970-01-01T00:00:00+00:00'
state_class: 'total_increasing'
device_class: energy
unit_of_measurement: kWh
sensor.smart_plug_pool_filter_energy_monitor:
last_reset: '1970-01-01T00:00:00+00:00'
state_class: 'total_increasing'
device_class: energy
unit_of_measurement: kWh