home-assistant-vimar icon indicating copy to clipboard operation
home-assistant-vimar copied to clipboard

Energy consumption not working

Open andreacocci95 opened this issue 1 year ago • 5 comments

Hi,

thanks for this integration. I used it for control lights on my HA.

I also have an energy guard for monitoring energy consumption that works perfectly on Vimar webserver website but is always 0kw on home assistant.

Screenshot_2023-11-26-01-34-01-62_3aea4af51f236e4932235fdada7d1643.jpg

Screenshot_2023-11-26-01-34-23-17_14f923dba7aa743f2820ba9cc8abb3d9.jpg

Can you help me? Thanks!

andreacocci95 avatar Nov 26 '23 00:11 andreacocci95

The problem is related to how the entities related to Vimar's energy consumption sensors are generated. In order for Home Assistant to correctly detect these sensors, as reported in the documentation, the device_class must be set to "energy" while it is currently set to "power", and the state_class parameter must be present, which is currently absent. home assistant related documentation

alanmastro avatar Dec 13 '23 15:12 alanmastro

I changed these values adding this text inside configuration.yaml but nothing changed:

homeassistant:
  customize:
    sensor.carichi_globale_controllo_consumo_totale:
      device_class: energy
      state_class: total
      unit_of_measurement: kWh

image

I reloaded HA but the values is always 0.

andreacocci95 avatar Dec 13 '23 16:12 andreacocci95

@andreacocci95 In the evening I'll try to make the change directly on the plugin code to correctly set the detected elements and I'll let you know.

alanmastro avatar Dec 14 '23 10:12 alanmastro

Thank you! 😁

andreacocci95 avatar Dec 14 '23 11:12 andreacocci95

@alanmastro any news?

andreacocci95 avatar Dec 30 '23 18:12 andreacocci95