-
Notifications
You must be signed in to change notification settings - Fork 4
/
hass-config-example.yaml
38 lines (36 loc) · 1.13 KB
/
hass-config-example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Example configuration.yaml entry
switch:
# template switch that combines the mqtt switch and a binary sensor
- platform: template
switches:
computer:
friendly_name: "Computer"
value_template: "{{ is_state('binary_sensor.computer', 'on') }}"
turn_on:
service: switch.turn_on
data:
entity_id: switch.computer_wol_proxy
turn_off: # can also add your own turn off service here
service: system_log.write
data:
message: "Computer does not support turning off"
level: warning
# MQTT switch that controls WOL-proxy
- platform: mqtt
name: "Computer-WOL-proxy"
command_topic: "WOL-proxy/command"
availability_topic: "WOL-proxy/status"
payload_on: "ab-cd-ef-01-23-45"
# payload_off: "OFF" # this does nothing
payload_available: "Online"
payload_not_available: "Offline"
optimistic: true
qos: 0
retain: false
binary_sensor:
# sensor that pings the computer to determine if it is on or off
- platform: ping
name: "Computer"
host: [IP address of computer]
count: 3
scan_interval: 15