Fix profile name update for Shelly Valve (#67778)

This commit is contained in:
Simone Chemelli 2022-03-07 18:05:10 +01:00 committed by GitHub
parent 99300570f1
commit d65b2b37dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -317,4 +317,14 @@ class BlockSleepingClimate(
if self.device_block and self.block:
_LOGGER.debug("Entity %s attached to blocks", self.name)
assert self.block.channel
self._preset_modes = [
PRESET_NONE,
*self.wrapper.device.settings["thermostats"][int(self.block.channel)][
"schedule_profile_names"
],
]
self.async_write_ha_state()