43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
automation:
|
|
- id: "1669966515993"
|
|
alias: Turn off Lounge TV
|
|
description: ""
|
|
trigger:
|
|
- platform: mqtt
|
|
topic: viewroad-commands/maintv/action
|
|
payload: "OFF"
|
|
condition: []
|
|
action:
|
|
- type: turn_off
|
|
device_id: 4a9f71fc64e158f1c9286d6e43ce782e
|
|
entity_id: remote.lounge_tv
|
|
domain: remote
|
|
mode: single
|
|
|
|
- id: tv_amp_follow_remote_state
|
|
alias: Lounge surround amp follows TV remote (5s debounce)
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: remote.lounge_tv
|
|
to: "on"
|
|
for: "00:00:05"
|
|
- platform: state
|
|
entity_id: remote.lounge_tv
|
|
to: "off"
|
|
for: "00:00:05"
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: remote.lounge_tv
|
|
state: "on"
|
|
sequence:
|
|
- service: switch.turn_on
|
|
target:
|
|
entity_id: switch.tv_surround_amp_power_in_loft_x27pp
|
|
default:
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.tv_surround_amp_power_in_loft_x27pp
|