diff --git a/homeassistant/components/shelly/climate.py b/homeassistant/components/shelly/climate.py index 810d662f75f..ffc66215678 100644 --- a/homeassistant/components/shelly/climate.py +++ b/homeassistant/components/shelly/climate.py @@ -145,9 +145,10 @@ class BlockSleepingClimate( if self.block is not None and self.device_block is not None: self._unique_id = f"{self.wrapper.mac}-{self.block.description}" + assert self.block.channel self._preset_modes = [ PRESET_NONE, - *wrapper.device.settings["thermostats"][cast(int, self.block.channel)][ + *wrapper.device.settings["thermostats"][int(self.block.channel)][ "schedule_profile_names" ], ]