From c1a842408e0d775dbb992281290f3c455a9770b7 Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Tue, 9 Jul 2024 11:38:27 +0200 Subject: [PATCH] Minor typing issues + black formatting --- custom_components/solvis_control/const.py | 9 ++++----- custom_components/solvis_control/coordinator.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/custom_components/solvis_control/const.py b/custom_components/solvis_control/const.py index 9c168a8..b7e02b0 100644 --- a/custom_components/solvis_control/const.py +++ b/custom_components/solvis_control/const.py @@ -21,12 +21,11 @@ class ModbusFieldConfig: # 1 = INPUT, 2 = HOLDING register: int = 1 negative: bool = False - absolut_value: bool = False entity_category: str = None enabled_by_default: bool = True edit: bool = False data: tuple = None - absolut_value: bool = False + absolute_value: bool = False PORT = 502 @@ -112,7 +111,7 @@ class ModbusFieldConfig: unit="°C", device_class="temperature", state_class="measurement", - absolut_value=True + absolute_value=True, ), ModbusFieldConfig( # Heizungspuffertemperatur oben name="tank_layer3_water_temp", @@ -120,7 +119,7 @@ class ModbusFieldConfig: unit="°C", device_class="temperature", state_class="measurement", - absolut_value=True + absolute_value=True, ), ModbusFieldConfig( # Warmwasserpuffer name="tank_layer4_water_temp", @@ -153,7 +152,7 @@ class ModbusFieldConfig: negative=True, multiplier=1, entity_category="diagnostic", - absolut_value=True, + absolute_value=True, ), ModbusFieldConfig( # Ionisationsstrom name="ionisation_voltage", diff --git a/custom_components/solvis_control/coordinator.py b/custom_components/solvis_control/coordinator.py index 0170c22..6e6f63e 100644 --- a/custom_components/solvis_control/coordinator.py +++ b/custom_components/solvis_control/coordinator.py @@ -67,7 +67,7 @@ async def _async_update_data(self): ) if register.negative: parsed_data[register.name] *= -1 - if register.absolut_value: + if register.absolute_value: parsed_data[register.name] = abs(parsed_data[register.name]) self.modbus.close()