Skip to content

Commit 002ca30

Browse files
committed
Typing fixes
1 parent 6cef05e commit 002ca30

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugwise/smile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ async def set_select(
238238
"""Set a dhw/gateway/regulation mode or the thermostat schedule option."""
239239
match key:
240240
case "select_dhw_mode" | "dhw_mode":
241-
await self.set_switch_state(loc_id, None, key, state)
241+
if state is not None:
242+
await self.set_switch_state(loc_id, None, key, state)
242243
case "select_gateway_mode":
243244
await self.set_gateway_mode(option)
244245
case "select_regulation_mode":
@@ -258,7 +259,7 @@ async def set_dhw_mode(self, key: str, loc_id: str, length: int, mode: str) -> N
258259
# Devices with the domestic_hot_water_comfort switch
259260
case 2:
260261
state = STATE_ON if mode == "comfort" else STATE_OFF
261-
await self.set_select(key, loc_id, None, state)
262+
await self.set_select(key, loc_id, "dummy", state)
262263
# Loria with extended dhw modes
263264
case _:
264265
data = (

0 commit comments

Comments
 (0)