Skip to content

Commit c1a8424

Browse files
committed
Minor typing issues + black formatting
1 parent ee1a0b5 commit c1a8424

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

custom_components/solvis_control/const.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ class ModbusFieldConfig:
2121
# 1 = INPUT, 2 = HOLDING
2222
register: int = 1
2323
negative: bool = False
24-
absolut_value: bool = False
2524
entity_category: str = None
2625
enabled_by_default: bool = True
2726
edit: bool = False
2827
data: tuple = None
29-
absolut_value: bool = False
28+
absolute_value: bool = False
3029

3130

3231
PORT = 502
@@ -112,15 +111,15 @@ class ModbusFieldConfig:
112111
unit="°C",
113112
device_class="temperature",
114113
state_class="measurement",
115-
absolut_value=True
114+
absolute_value=True,
116115
),
117116
ModbusFieldConfig( # Heizungspuffertemperatur oben
118117
name="tank_layer3_water_temp",
119118
address=33027,
120119
unit="°C",
121120
device_class="temperature",
122121
state_class="measurement",
123-
absolut_value=True
122+
absolute_value=True,
124123
),
125124
ModbusFieldConfig( # Warmwasserpuffer
126125
name="tank_layer4_water_temp",
@@ -153,7 +152,7 @@ class ModbusFieldConfig:
153152
negative=True,
154153
multiplier=1,
155154
entity_category="diagnostic",
156-
absolut_value=True,
155+
absolute_value=True,
157156
),
158157
ModbusFieldConfig( # Ionisationsstrom
159158
name="ionisation_voltage",

custom_components/solvis_control/coordinator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async def _async_update_data(self):
6767
)
6868
if register.negative:
6969
parsed_data[register.name] *= -1
70-
if register.absolut_value:
70+
if register.absolute_value:
7171
parsed_data[register.name] = abs(parsed_data[register.name])
7272
self.modbus.close()
7373

0 commit comments

Comments
 (0)