-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome_assistant_config.yaml
62 lines (57 loc) · 1.63 KB
/
home_assistant_config.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Command_line switches
switch:
- platform: command_line
switches:
disallow_person1:
command_on: python scripts/adg_clients.py person1 on
command_off: python scripts/adg_clients.py person1 off
command_state: python scripts/adg_clients.py person1 state
value_template: '{{ value == "True" }}'
disallow_person2:
command_on: python scripts/adg_clients.py person2 on
command_off: python scripts/adg_clients.py person2 off
command_state: python scripts/adg_clients.py person2 state
value_template: '{{ value == "True" }}'
# Example automations for time/workday switching
automation:
## person1 #################
- alias: disallow_person1_on
trigger:
- platform: time
at: "00:00:05"
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
action:
- service: switch.turn_on
entity_id: switch.disallow_person1
- alias: disallow_person1_off
trigger:
- platform: time
at: "06:00:00"
action:
- service: switch.turn_off
entity_id: switch.disallow_person1
## person2 #################
- alias: disallow_person2_on
trigger:
- platform: time
at: "23:00:01"
action:
- service: switch.turn_on
entity_id: switch.disallow_person2
- alias: disallow_person2_off
trigger:
- platform: time
at: "06:00:00"
action:
- service: switch.turn_off
entity_id: switch.disallow_person2