home-automation-home-assistant/config/switches/misc.yaml
2021-03-21 18:41:41 +01:00

37 lines
1.2 KiB
YAML

- platform: template
switches:
desktop_wol:
value_template: "{{ is_state('binary_sensor.desktop_ping', 'on') }}"
turn_on:
service: shell_command.ssh
data:
sshkey: !secret sshkey_wakeonlan
host: !secret nas_ip
user: !secret nas_ssh_user
port: !secret nas_ssh_port
command_or_param: !secret desktop_mac
turn_off:
service: script.dummy
desktop_jenny_wol:
value_template: "{{ is_state('binary_sensor.desktop_jenny_ping', 'on') }}"
turn_on:
service: shell_command.ssh
data:
sshkey: !secret sshkey_wakeonlan
host: !secret nas_ip
user: !secret nas_ssh_user
port: !secret nas_ssh_port
command_or_param: !secret desktop_jenny_mac
turn_off:
service: script.dummy
onair_lamp_recording:
value_template: "{{ is_state('input_boolean.onair_lamp_recording', 'on') }}"
turn_on:
- service: input_boolean.turn_on
entity_id: input_boolean.onair_lamp_recording
turn_off:
- service: input_boolean.turn_off
entity_id: input_boolean.onair_lamp_recording