From 02d7ee91fcbd9b4486b92fb470ee49dcd2f32799 Mon Sep 17 00:00:00 2001 From: Marcel Kummer Date: Sat, 10 Aug 2024 14:47:46 +0200 Subject: [PATCH 1/2] Remove ".1" from SBSE sensor profile `BatDsch.CurBatDsch` The profile name with `.1` included does not appear in the ennexosSensors list and is therefore never picked up. --- pysma/definitions_ennexos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysma/definitions_ennexos.py b/pysma/definitions_ennexos.py index 9a2a5af..39a331c 100644 --- a/pysma/definitions_ennexos.py +++ b/pysma/definitions_ennexos.py @@ -226,7 +226,7 @@ "BatChrg.CurBatChaArr.1", "BatDsch.BatDsch", "BatDsch.BatDschArr.1", - "BatDsch.CurBatDsch.1", + "BatDsch.CurBatDsch", "BatDsch.CurBatDschArr.1", "DcMs.TotDcEnCntWh.1", "DcMs.TotDcEnCntWh.2", From fa31597fa892ebd8ed4a7e5318f6a85af3bf961e Mon Sep 17 00:00:00 2001 From: Marcel Kummer Date: Sat, 10 Aug 2024 14:49:55 +0200 Subject: [PATCH 2/2] Fix sensor setup for battery (dis)charging power * `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. --- pysma/definitions_ennexos.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pysma/definitions_ennexos.py b/pysma/definitions_ennexos.py index 39a331c..5d1f880 100644 --- a/pysma/definitions_ennexos.py +++ b/pysma/definitions_ennexos.py @@ -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),