Files
fresh-home/automations/rooms/great_room/great_room_light_switch.yaml
T
2025-10-10 20:24:52 -04:00

61 lines
1.8 KiB
YAML

alias: Great Room Light Switch
description: "Handles button presses for the Great Room Motion Switch"
id: automation.great_room_light_switch
mode: single
trigger:
- platform: state
entity_id:
- switch.great_room_motion_switch
from: "on"
to: "off"
id: turned_off
- platform: state
entity_id:
- switch.great_room_motion_switch
from: "off"
to: "on"
id: turned_on
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: turned_off
- condition: state
entity_id: switch.great_room_motion_switch
state: "off"
sequence:
- action: input_select.select_option
data:
option: Manual
target:
entity_id: input_select.great_room_mode
- conditions:
- condition: trigger
id: turned_on
- condition: state
entity_id: switch.great_room_motion_switch
state: "on"
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_select.great_room_mode
state: Manual
sequence:
- action: input_select.select_option
data:
option: Auto
target:
entity_id: input_select.great_room_mode
- conditions:
- condition: state
entity_id: input_select.great_room_mode
state: Auto
sequence:
- action: input_select.select_option
data:
option: Bright
target:
entity_id: input_select.great_room_mode