Fix misuse of cast for Shelly Valve (#64181)

This commit is contained in:
Simone Chemelli 2022-01-16 15:28:49 +01:00 committed by GitHub
parent 2ee2626e8b
commit a1e7459dc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"
],
]