Skip to content

Commit ce5b01b

Browse files
committed
Fix ruff error
1 parent 8b05107 commit ce5b01b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

custom_components/luxtronik/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ class LuxDaySelectorParameter(StrEnum):
313313

314314
class LuxParameter(StrEnum):
315315
"""Luxtronik parameter ids."""
316-
316+
317317
UNSET: Final = "UNSET"
318318
P0001_HEATING_TARGET_CORRECTION: Final = "parameters.ID_Einst_WK_akt"
319319
P0002_DHW_TARGET_TEMPERATURE: Final = "parameters.ID_Einst_BWS_akt"

custom_components/luxtronik/select.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _handle_coordinator_update(
111111
async def async_select_option(self, option: str) -> None:
112112
"""Handle selection of a new day."""
113113
self._attr_current_option = option
114-
data = self.coordinator.data if data is None else data
114+
data = self.coordinator.data
115115
if data is None:
116116
return
117117

@@ -121,10 +121,10 @@ async def async_select_option(self, option: str) -> None:
121121
current_value = int(get_sensor_data(data, param))
122122

123123
if current_value != desired_value:
124-
data = await self.coordinator.async_write(
124+
updated_data = await self.coordinator.async_write(
125125
param.split(".")[1], desired_value
126126
)
127-
self._handle_coordinator_update(data)
127+
self._handle_coordinator_update(updated_data)
128128

129129
async def async_update(self) -> None:
130130
"""Read current day from heat pump and update selected option."""

0 commit comments

Comments
 (0)