gluap / pyess

Python library for communication with LG ESS power converters
MIT License
31 stars 10 forks source link

unit of measurement wrong for homeassistant #14

Closed patsch9 closed 2 years ago

patsch9 commented 2 years ago

Hi,

In essmqtt.py there is a wrong attribute:

if "enegy" in sensor or "energy" in sensor:  # typo in ess json
    description["**unit_of_measuremnt**"] = "Wh"
    description["icon"] = "mdi:gauge"

please set it to if "enegy" in sensor or "energy" in sensor: # typo in ess json description["unit_of_measurement"] = "Wh" description["icon"] = "mdi:gauge"

Thanks for the great work!

Patrick

gluap commented 2 years ago

Hi Patrick,

this should be fixed by the latest changes, thank you for reporting this (and delivering the solution in the issue)!

Cheers, Paul

patsch9 commented 2 years ago

Great! Thanks for fixing