Skip to content

Commit 410da26

Browse files
author
Thomas Heinz
committed
Trigger fast polling for all room shades when a scene is activated
1 parent dbeb2a4 commit 410da26

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • custom_components/warema_wms_webcontrol

custom_components/warema_wms_webcontrol/button.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,13 @@ def name(self):
4545
def press(self) -> None:
4646
"""Press the button to activate the scene."""
4747
_LOGGER.debug("Activating scene: %s", self.name)
48+
49+
# When a scene is activated, we don't know exactly which shades move.
50+
# Optimistically set all shades in the same room to 'moving' so that
51+
# Home Assistant starts fast-polling them and the UI updates quickly.
52+
if hasattr(self, 'hass') and 'warema_shades' in self.hass.data:
53+
for s in self.hass.data['warema_shades']:
54+
if s.room.id == self.shade.room.id and not s.is_scene:
55+
s.is_moving = True
56+
4857
self.shade.play_scene()

0 commit comments

Comments
 (0)