Skip to content

Commit

Permalink
Minor typing issues + black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsK1 committed Jul 9, 2024
1 parent ee1a0b5 commit c1a8424
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions custom_components/solvis_control/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -112,15 +111,15 @@ class ModbusFieldConfig:
unit="°C",
device_class="temperature",
state_class="measurement",
absolut_value=True
absolute_value=True,
),
ModbusFieldConfig( # Heizungspuffertemperatur oben
name="tank_layer3_water_temp",
address=33027,
unit="°C",
device_class="temperature",
state_class="measurement",
absolut_value=True
absolute_value=True,
),
ModbusFieldConfig( # Warmwasserpuffer
name="tank_layer4_water_temp",
Expand Down Expand Up @@ -153,7 +152,7 @@ class ModbusFieldConfig:
negative=True,
multiplier=1,
entity_category="diagnostic",
absolut_value=True,
absolute_value=True,
),
ModbusFieldConfig( # Ionisationsstrom
name="ionisation_voltage",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/solvis_control/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit c1a8424

Please sign in to comment.