From 3d995495988b94f3daef880946250d21a57069ec Mon Sep 17 00:00:00 2001 From: Santobert Date: Mon, 4 Nov 2019 11:34:53 +0100 Subject: [PATCH] Add scene.create service (#11030) * Add service scene.create * State is mandatory * Revert out of scope change * Update format --- source/_integrations/scene.markdown | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/source/_integrations/scene.markdown b/source/_integrations/scene.markdown index 2745e4825ef..0e52c743523 100644 --- a/source/_integrations/scene.markdown +++ b/source/_integrations/scene.markdown @@ -88,3 +88,29 @@ 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: + state: on + source: HDMI 1 +```