Skip to content

Commit

Permalink
Fix sensor setup for battery (dis)charging power
Browse files Browse the repository at this point in the history
* `CurBatChaArr.1` is a subcomponent of the overall value in
`CurBatCha`, thus it should have the `_a` identifier.
* Swap the `_a` and `_total_` identifiers for `CurBatDsch` and
`CurBatDschArr.1`, reflecting the subcomponent hierarchy as well.

In both cases, the `Arr.1` value is slightly different from the total
value for me, but it is not obvious why and how. I just have one
battery, so in my world they should be the same. Therefore I'd stick
to the hierarchical setup. If needed both can be made available in Home
Assistant.
  • Loading branch information
tanuva committed Aug 10, 2024
1 parent 02d7ee9 commit fa31597
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pysma/definitions_ennexos.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,12 @@
Sensor("BatChrg.BatChrgArr.1", None, factor=1, unit=None),
Sensor("BatChrg.BatChrg", None, factor=1, unit=None),
Sensor("BatChrg.CurBatCha", Identifier.battery_power_charge_total, factor=1, unit="W"),
Sensor("BatChrg.CurBatChaArr.1", Identifier.battery_power_charge_total, factor=1, unit="W"),
Sensor("BatChrg.CurBatChaArr.1", Identifier.battery_power_charge_a, factor=1, unit="W"),
Sensor("Bat.Diag.VolMax.1", None, factor=1, unit=None),
Sensor("BatDsch.BatDschArr.1", None, factor=1, unit=None),
Sensor("BatDsch.BatDsch", None, factor=1, unit=None),
Sensor("BatDsch.CurBatDsch", Identifier.battery_power_discharge_a, factor=1, unit="W"),
Sensor("BatDsch.CurBatDschArr.1", Identifier.battery_discharge_total, factor=1, unit="W"),
Sensor("BatDsch.CurBatDsch", Identifier.battery_power_discharge_total, factor=1, unit="W"),
Sensor("BatDsch.CurBatDschArr.1", Identifier.battery_power_discharge_a, factor=1, unit="W"),
Sensor("Bat.OpTms.1", None, factor=1, unit=None),
Sensor("Bat.Vol.1", Identifier.battery_voltage_a, factor=1, unit="V"),
Sensor("ChaSess.WhIn", None, factor=1, unit=None),
Expand Down

0 comments on commit fa31597

Please sign in to comment.