Skip to content

Commit

Permalink
add wallbox discharging power
Browse files Browse the repository at this point in the history
this is used as dummy for the energy dashboard of homeassistant
it may be used if wallbox is able to reclaim energy from car
  • Loading branch information
Ulf Dambacher committed Oct 1, 2022
1 parent c0a6814 commit a32bcf6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pysenec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,20 @@ def wallbox_power(self) -> float:
"""
Wallbox Total Charging Power (W)
"""
return self._raw["WALLBOX"]["APPARENT_CHARGING_POWER"][0]
value = self._raw["WALLBOX"]["APPARENT_CHARGING_POWER"][0]
if value >0:
return value
return 0

@property
def wallbox_imported_power(self) -> float:
"""
Wallbox Total Discharging Power (W) - currently not useable but needed as dummy for energy dashboard
"""
value = self._raw["WALLBOX"]["APPARENT_CHARGING_POWER"][0]
if value <0:
return abs(value)
return 0

@property
def wallbox_ev_connected(self) -> bool:
Expand Down

0 comments on commit a32bcf6

Please sign in to comment.