47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
---
|
|
- alias: "[Remote Control] Kitchen Scene Next"
|
|
initial_state: 'true'
|
|
trigger:
|
|
platform: state
|
|
entity_id: sensor.remote_kitchen_01_action
|
|
to: "arrow_right_click"
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.kitchen_light_state
|
|
state: "on"
|
|
action:
|
|
- service: input_select.select_next
|
|
target:
|
|
entity_id: input_select.kitchen_scenes
|
|
|
|
- alias: "[Remote Control] Kitchen Scene Prev"
|
|
initial_state: 'true'
|
|
trigger:
|
|
platform: state
|
|
entity_id: sensor.remote_kitchen_01_action
|
|
to: "arrow_left_click"
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.kitchen_light_state
|
|
state: "on"
|
|
action:
|
|
- service: input_select.select_previous
|
|
target:
|
|
entity_id: input_select.kitchen_scene
|
|
|
|
- alias: "[Remote Control] Kitchen Scene On"
|
|
initial_state: 'true'
|
|
trigger:
|
|
platform: state
|
|
entity_id: sensor.remote_kitchen_01_action
|
|
to: "toggle"
|
|
action:
|
|
- service_template: >
|
|
{% if states.input_boolean.kitchen_light_state.state == 'off' %}
|
|
input_boolean.turn_on
|
|
{% else %}
|
|
input_boolean.turn_off
|
|
{% endif %}
|
|
entity_id:
|
|
- input_boolean.kitchen_light_state
|