From 14d80dc4fdd96ca3d7277f6a59a3e985f4890d60 Mon Sep 17 00:00:00 2001 From: Tobias Haase Date: Tue, 29 Oct 2019 08:55:08 +0100 Subject: [PATCH 1/4] Add service scene.create --- source/_integrations/scene.markdown | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source/_integrations/scene.markdown b/source/_integrations/scene.markdown index 2745e4825ef5..f8e38a884b9a 100644 --- a/source/_integrations/scene.markdown +++ b/source/_integrations/scene.markdown @@ -88,3 +88,28 @@ automation: ## Reloading scenes Whenever you make a change to your scene configuration, you can call the `scene.reload` service to reload the scenes. + +## Creating scenes on the fly + +Create a new scene without having to configure it by calling the `scene.create` service. This scene will be discarded after reloading the configuration. + +You need to pass a scene_id in lowercase and with underscores instead of spaces. You also need to specify the entities in the same format as when configuring the scene. + +```yaml +# Example automation +automation: + trigger: + platform: homeassistant + event: start + action: + service: scene.create + data: + scene_id: my_scene + entities: + light.tv_back_light: + state: on + brightness: 100 + light.ceiling: off + media_player.sony_bravia_tv: + source: HDMI 1 +``` From b4d336f00f772464169cde5f1d6da90a0fd8eeba Mon Sep 17 00:00:00 2001 From: Tobias Haase Date: Tue, 29 Oct 2019 09:02:04 +0100 Subject: [PATCH 2/4] State is mandatory --- source/_integrations/scene.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/_integrations/scene.markdown b/source/_integrations/scene.markdown index f8e38a884b9a..79164cd53f5f 100644 --- a/source/_integrations/scene.markdown +++ b/source/_integrations/scene.markdown @@ -82,6 +82,7 @@ automation: brightness: 100 light.ceiling: off media_player.sony_bravia_tv: + state: on source: HDMI 1 ``` @@ -111,5 +112,6 @@ automation: brightness: 100 light.ceiling: off media_player.sony_bravia_tv: + state: on source: HDMI 1 ``` From 0bc5176c24c3b04640c2f07b9929479b8b958050 Mon Sep 17 00:00:00 2001 From: Tobias Haase Date: Thu, 31 Oct 2019 22:45:57 +0100 Subject: [PATCH 3/4] Revert out of scope change --- source/_integrations/scene.markdown | 1 - 1 file changed, 1 deletion(-) diff --git a/source/_integrations/scene.markdown b/source/_integrations/scene.markdown index 79164cd53f5f..fe7953e78c1e 100644 --- a/source/_integrations/scene.markdown +++ b/source/_integrations/scene.markdown @@ -82,7 +82,6 @@ automation: brightness: 100 light.ceiling: off media_player.sony_bravia_tv: - state: on source: HDMI 1 ``` From 5850e1a3b11de3a0b04d0cc6e97c12b74281264e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 4 Nov 2019 10:38:36 +0100 Subject: [PATCH 4/4] Update format --- source/_integrations/scene.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_integrations/scene.markdown b/source/_integrations/scene.markdown index fe7953e78c1e..0e52c743523c 100644 --- a/source/_integrations/scene.markdown +++ b/source/_integrations/scene.markdown @@ -93,7 +93,7 @@ Whenever you make a change to your scene configuration, you can call the `scene. Create a new scene without having to configure it by calling the `scene.create` service. This scene will be discarded after reloading the configuration. -You need to pass a scene_id in lowercase and with underscores instead of spaces. You also need to specify the entities in the same format as when configuring the scene. +You need to pass a `scene_id` in lowercase and with underscores instead of spaces. You also need to specify the entities in the same format as when configuring the scene. ```yaml # Example automation