From c73901e3b45654a9bd061c47bc46608698a45507 Mon Sep 17 00:00:00 2001 From: Antony Male Date: Tue, 30 May 2023 20:24:39 +0100 Subject: [PATCH] Fix scale in bms_watthours_total This was originally fixed in #168, but #167 seems to have accidentally reverted it. Fixes: #299 --- custom_components/foxess_modbus/entities/entity_descriptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/foxess_modbus/entities/entity_descriptions.py b/custom_components/foxess_modbus/entities/entity_descriptions.py index db6d23f..0f06d16 100644 --- a/custom_components/foxess_modbus/entities/entity_descriptions.py +++ b/custom_components/foxess_modbus/entities/entity_descriptions.py @@ -1060,7 +1060,7 @@ def _pv_energy_total(key: str, models: list[EntitySpec], name: str, source_entit device_class=SensorDeviceClass.ENERGY, state_class=SensorStateClass.TOTAL, native_unit_of_measurement="kWh", - scale=0.1, + scale=0.001, round_to=1, signed=False, validate=[Min(0)],