Add scene.create service (#11030)

* Add service scene.create

* State is mandatory

* Revert out of scope change

* Update format
This commit is contained in:
Santobert 2019-11-04 11:34:53 +01:00 committed by Franck Nijhof
parent a67e08d9f1
commit 3d99549598

View File

@ -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
```