mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Add scene.create service (#11030)
* Add service scene.create * State is mandatory * Revert out of scope change * Update format
This commit is contained in:
parent
a67e08d9f1
commit
3d99549598
@ -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
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user