# This file loads up my switches
#
# https://www.home-assistant.io/components/switch/
#
switch: !include_dir_list ../switches
platform: template
switches:
laptop:
value_template: "{{ is_state('device_tracker.laptop', 'home') }}"
turn_on:
service: shell_command.laptop_wol
turn_off:
service: shell_command.laptop_suspend
platform: template
switches:
pc:
value_template: "{{ is_state('device_tracker.steam', 'home') }}"
turn_on:
service: shell_command.steam_wol
turn_off:
service: shell_command.steam_suspend
# This file loads up my switches
#
# https://www.home-assistant.io/components/switch/
#
#switch: !include_dir_list ../switches
switch:
- platform: template
switches:
pc:
value_template: "{{ is_state('device_tracker.steam', 'home') }}"
turn_on:
service: shell_command.steam_wol
turn_off:
service: shell_command.steam_suspend
- platform: template
switches:
laptop:
value_template: "{{ is_state('device_tracker.laptop', 'home') }}"
turn_on:
service: shell_command.laptop_wol
turn_off:
service: shell_command.laptop_suspend