25 lines
682 B
YAML
25 lines
682 B
YAML
---
|
|
- alias: "[Backyard] Light On (by input_boolean)"
|
|
initial_state: "true"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.backyard_light_state
|
|
to: "on"
|
|
action:
|
|
- service: scene.turn_on
|
|
data_template:
|
|
entity_id: scene.backyard_{{ states.input_text.backyard_last_scene.state | replace(' ', '_') | lower | string }}
|
|
transition: 2.5
|
|
|
|
- alias: "[Backyard] Light Off (by input boolean)"
|
|
initial_state: "true"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.backyard_light_state
|
|
to: "off"
|
|
action:
|
|
- service: scene.turn_on
|
|
data_template:
|
|
entity_id: scene.backyard_off
|
|
transition: 2.5
|