Files
fresh-home/automations/rooms/great_room/great_room_light_switch.yaml
T
2024-04-14 14:08:56 -04:00

60 lines
1.6 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:
- service: 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:
- service: 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:
- service: input_select.select_option
data:
option: Bright
target:
entity_id: input_select.great_room_mode