Skip to content

Commit

Permalink
Support Goodwe Power Meter (Issue #92)
Browse files Browse the repository at this point in the history
The Power Meter is like a HomeKit in that it exposes grid power in and out, but unlike a HomeKit it doesn't have a serial number. 

Without these lines the data doesn't get collected property. 

I've been running these lines 'hacked in' for the last 10 months.
  • Loading branch information
IsaacInsoll authored Sep 24, 2024
1 parent 031905c commit 8b6dae5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions custom_components/sems/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ async def async_update_data():
powerflow = result["powerflow"]

powerflow["sn"] = result["homKit"]["sn"]

# Goodwe 'Power Meter' (not HomeKit) doesn't have a sn
# Let's put something in, otherwise we can't see the data.
if powerflow["sn"] is None:
powerflow["sn"] = "GW-HOMEKIT-NO-SERIAL"

#_LOGGER.debug("homeKit sn: %s", result["homKit"]["sn"])
# This seems more accurate than the Chart_sum
powerflow["all_time_generation"] = result["kpi"]["total_power"]
Expand Down

0 comments on commit 8b6dae5

Please sign in to comment.