1
0
ansible-home-assistant/roles/automations/files/living-room-button.yaml

155 lines
4.2 KiB
YAML

# Living Room button
- id: living_room_button_1 # Upper Left
alias: '[Living Room] Button 1 - Office Light'
description: ''
mode: single
trigger:
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_1
action:
- service: script.table_lights_toggle
- id: living_room_button_2 # Upper right
alias: '[Living Room] Button 2 - Couch Light'
description: ''
mode: single
trigger:
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_2
action:
- service: script.living_room_lights_toggle
- id: living_room_button_3 # Middle left
alias: '[Living Room] Button 3 - AndroidTV'
description: ''
mode: single
trigger:
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_3
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- service: script.tv_atv
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: script.tv_atv
- id: living_room_button_4 # Middle right
alias: '[Living Room] Button 4 - Xbox'
description: ''
mode: single
trigger:
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_4
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- service: script.tv_xbox
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: script.tv_xbox
- id: living_room_button_5 # Bottom left
alias: '[Living Room] Button 5 - Nintendo Swithc'
description: ''
mode: single
trigger:
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_5
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- service: script.tv_nintendo_switch
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: script.tv_nintendo_switch
- id: living_room_button_6 # Bottom right
alias: '[Living Room] Button 6 - Playstation4'
description: ''
mode: single
trigger:
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_6
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- service: script.tv_ps4
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: script.tv_ps4
- id: living_room_tv_off
alias: '[Living Room] Turn TV Off'
mode: single
trigger:
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_double_press
subtype: button_3
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_double_press
subtype: button_4
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_double_press
subtype: button_5
- device_id: 6f68b487f932c9b73d17ff82cb453617
domain: zha
platform: device
type: remote_button_alt_double_press
subtype: button_6
action:
- service: remote.turn_off
entity_id: remote.harmonyhub