msx8020 / ChargesplitHomeAssistant

Chargesplit Wallbox custom component for home assistant
GNU General Public License v3.0
2 stars 0 forks source link

Add total power house consumption #1

Open softwarebloat opened 3 weeks ago

softwarebloat commented 3 weeks ago

Thanks for this custom integration! it's great! considering chargesplit it is able to read the house power consumption to balance the load of car charges, would be cool to have the total power consumption (kWh) to be used in home assistant energy tab to have the total consumed energy from the grid (even though it's probably not so accurate in a three phase system).

so reading the code i think something like this should be added in sensor.py:

(
    "total_power_house_power",
    "Total House Consumption",
    "TOTALHOUSEPWR",
    UnitOfEnergy.KILO_WATT_HOUR,
    "mdi:speedometer",
    SensorDeviceClass.ENERGY,
    SensorStateClass.TOTAL_INCREASING,
    serial,
)

but i think that's not enough to register the entity as i tried in my instance and i can see it now but it's unavailable: image i guess that needs to be fetched from the api probably

so as i said, would be a nice to have it to be able to add it here as a source: image

softwarebloat commented 3 weeks ago

i've been privately contacted by Chargesplit Customer Service and i made a few tests. i believe the Chargeslipt API should return that value with the new key ((e.g.: "TOTALHOUSEPWR" ) so that home assistant can use it.