alcar21 / WemosEM

Cheap power monitor (STC013) with Home Assistant Discover and Wemos D1 Mini / PRO (esp8266)
113 stars 24 forks source link

Energy integration Home Assistant #25

Closed Watanakas closed 3 years ago

Watanakas commented 3 years ago

Someone is using this meter with the new Hassio version with the energy integration, the sensors do not appear, they can explain if it works for them and how they have done it, thank you.

rantanlan commented 3 years ago

just use a template sensor, i have 3 wemosEM running one for one phase in my flat and add them up in one sensor:

- platform: template
    sensors:
      energy_total:
        friendly_name: 'Total Energy'
        value_template: "{{ float(states('sensor.wemosem_xxxxx_kwh')) + float(states('sensor.wemosem_xxxxx_kwh')) + float(states('sensor.wemosem_xxxxx_kwh')) |round(5) }}"
        unit_of_measurement: 'kWh'
        device_class: energy 

then just use the utility source and you can select is as a unit in the energy meter:

utility_meter:
  energy:
    source: sensor.energy_total
    cycle: yearly
Watanakas commented 3 years ago

working, I only have a wemosEM, I have adapted it to my sensor, thanks.