Scene transitions

This commit is contained in:
MasseR committed 2026-09-29 18:05:51 +03:00
1 parent 219f75c0e4
commit f4c82df968
2 files changed
+10 -4

No files matched your search

+6 -2
View File
@@ -32,6 +32,7 @@ module HomeAssistant.Controller
, IkeaButton(..)
, IkeaGesture(..)
, activateScene
, activateSceneWith
, ikeaBoxRemote
, IkeaController(..)
) where
@@ -259,9 +260,12 @@ ikeaBoxRemote entityId = entityChangeEvent' entityId
eventType v = v ^? key "event" . key "variables" . key "trigger" . key "to_state" . key "attributes" . key "event_type" . _String . to toIkeaController . traversed
activateScene :: T.Text -> Service
activateScene sceneId = Service
activateScene sceneId = activateSceneWith sceneId Nothing
activateSceneWith :: T.Text -> Maybe Value -> Service
activateSceneWith sceneId d = Service
{ serviceDomain="scene"
, serviceName= "turn_on"
, serviceTarget= [EntityId sceneId]
, serviceData = Nothing
, serviceData = d
}