From d65b2b37dcd3fa68d364aa159cbe14123fc69184 Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Mon, 7 Mar 2022 18:05:10 +0100 Subject: [PATCH] Fix profile name update for Shelly Valve (#67778) --- homeassistant/components/shelly/climate.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/homeassistant/components/shelly/climate.py b/homeassistant/components/shelly/climate.py index 2c81ecbe183..1e7ba2dd183 100644 --- a/homeassistant/components/shelly/climate.py +++ b/homeassistant/components/shelly/climate.py @@ -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()