-
Notifications
You must be signed in to change notification settings - Fork 1
/
workday.yaml
164 lines (144 loc) · 4.38 KB
/
workday.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
################################################################
## Packages / Workday
################################################################
################################################
## Customize
################################################
homeassistant:
customize:
################################################
## Node Anchors
################################################
package.node_anchors:
customize: &customize
package: "workday"
expose: &expose
<<: *customize
haaska_hidden: false
homebridge_hidden: false
################################################
## Automation
################################################
automation.arrive_at_work:
<<: *customize
friendly_name: "Arrive at work"
automation.vacuum_while_working:
<<: *customize
friendly_name: "Vacuum while at work"
icon: mdi:robot-vacuum
automation.turn_off_office_lamp_when_work_tp_camera_active:
<<: *customize
friendly_name: "Turn off Rear Office Lamp when Camera On"
automation.turn_on_office_lamp_when_work_tp_camera_inactive:
<<: *customize
friendly_name: "Turn on Rear Office Lamp when Camera Off"
################################################
## Binary Sensors
################################################
################################################
## Input Datetime
################################################
################################################
## Automation
################################################
automation:
- id: arrive_at_work
alias: arrive_at_work
trigger:
- platform: zone
entity_id: device_tracker.bayesian_zeke_home
event: enter
zone: zone.work
condition:
condition: state
entity_id: "binary_sensor.workday_sensor"
state: "on"
action:
- service: climate.set_preset_mode
entity_id: climate.my_ecobee
data:
preset_mode: "Away"
- service: notify.all
data:
message: "Arriving at work. Setting Ecobee Away."
- id: turn_off_morning_routine
alias: turn_off_morning_routine
trigger:
- platform: time
at: "00:00:01"
action:
- service: homeassistant.turn_off
data:
entity_id: input_boolean.morning_routine
- id: turn_off_office_lamp_when_work_tp_camera_active
alias: turn_off_office_lamp_when_work_tp_camera_active
trigger:
- platform: state
entity_id: binary_sensor.ryans_macbook_pro_camera_in_use
to: "on"
action:
- service: light.turn_off
data:
entity_id: light.office_floor_lamp
- service: media_player.media_pause
data:
entity_id:
- media_player.spotify
- media_player.office
- id: turn_on_office_lamp_when_work_tp_camera_inactive
alias: turn_on_office_lamp_when_work_tp_camera_inactive
trigger:
- platform: state
entity_id: binary_sensor.ryans_macbook_pro_camera_in_use
to: "off"
action:
- service: light.turn_on
data:
entity_id: light.office_floor_lamp
- id: vacuum_while_working
alias: vacuum_while_working
trigger:
# - platform: state
# entity_id: device_tracker.bayesian_zeke_home
# to: 'Work'
- entity_id: device_tracker.bayesian_zeke_home
event: enter
platform: zone
zone: zone.work
# - platform: event
# event_type: ios.notification_action_fired
# event_data:
# actionName: VACUUM_HOUSE
- platform: event
event_type: mobile_app_notification_action
event_data:
action: VACUUM_HOUSE
condition: []
action:
- alias: Start Vacuums
service: vacuum.start
target:
entity_id: all
########################
# Binary Sensors
########################
binary_sensor:
- platform: workday
country: US
province: !secret home_state
########################
# Input Booleans
########################
input_boolean:
morning_routine:
################################################
## Input Datetime
################################################
input_datetime:
################################################
## Sensor
################################################
sensor:
- platform: time_date
display_options:
- time