sfstar / hass-victron

Integration for Home Assistant to fetch data from the victron gx device via modbusTCP
Apache License 2.0
157 stars 24 forks source link

Only assign device class battery to entities measured in percentages #185

Closed sfstar closed 3 months ago

sfstar commented 3 months ago

Battery soc in general overview is incorrectly reporting 0% due to non SOC related entities getting assigned with the battery device class. Allowing them to be selected by HA as the devices current SOC to be displayed #130. This PR only assigns SOC entities the battery device class and sets no device class for other percentage based entities that aren't of type moisture, humidity or state of charge.

sfstar commented 3 months ago
image

Tested locally and the change works