1 """Support for deCONZ scenes."""
3 from __future__
import annotations
7 from pydeconz.models.event
import EventType
14 from .entity
import DeconzSceneMixin
15 from .hub
import DeconzHub
20 config_entry: ConfigEntry,
21 async_add_entities: AddEntitiesCallback,
23 """Set up scenes for deCONZ integration."""
24 hub = DeconzHub.get_hub(hass, config_entry)
25 hub.entities[SCENE_DOMAIN] = set()
28 def async_add_scene(_: EventType, scene_id: str) ->
None:
29 """Add scene from deCONZ."""
30 scene = hub.api.scenes[scene_id]
33 hub.register_platform_add_device_callback(
40 """Representation of a deCONZ scene."""
45 """Activate the scene."""
46 await self.hub.api.scenes.recall(
47 self._device.group_id,
None async_activate(self, **Any kwargs)
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)