-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbinary_sensor.yaml
executable file
·244 lines (226 loc) · 6.96 KB
/
binary_sensor.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
#HomeCam
- platform: mqtt
name: Homecam Motion
state_topic: 'homecam/motion/reading'
value_template: '{{ states.sensor.homecam_motion_raw_json.state.split("status\": \"")[1].split("\"")[0] }}'
payload_on: "MOTION"
payload_off: "NO MOTION"
device_class: motion
- platform: template
sensors:
room_occupied:
friendly_name: "HomeCam Triggered"
device_class: occupancy
delay_off: 350
entity_id:
- binary_sensor.homecam_motion
value_template: >-
{{ is_state( 'binary_sensor.homecam_motion', 'on' ) }}
#Kiosk
kiosk_motion:
friendly_name: "Kiosk Motion"
value_template: >-
{{ is_state('sensor.kiosk_sensors', 'onMotion') }}
delay_off: 30
device_class: motion
kiosk_movement:
friendly_name: "Kiosk Movement"
value_template: >-
{{ is_state('sensor.kiosk_sensors', 'onMovement') }}
delay_off: 30
device_class: motion
- platform: mqtt
name: "Kiosk Screen"
payload_on: "screenOn"
payload_off: "screenOff"
state_topic: "kiosk_sensors/+/ec9832e0-7bf68e41"
value_template: '{{value_json.event}}'
- platform: mqtt
name: "Kiosk Power"
payload_on: "pluggedAC"
payload_off: "unplugged"
state_topic: "kiosk_sensors/+/ec9832e0-7bf68e41"
value_template: '{{value_json.event}}'
- platform: mqtt
name: Tablet Motion
state_topic: tablet/kiosk
device_class: motion
# - platform: template
# sensors:
# kiosk_att_motion:
# friendly_name: "Kiosk Motion Detect"
# device_class: motion
# value_template: >-
# {% if states('states.sensor.kiosk_atts.attributes.motionDetectorState') | float == 2 %}
# On
# {% elif states('states.sensor.kiosk_atts.attributes.motionDetectorState') | float == 0 %}
# Off
# {% else %}
# Unknown
# {% endif %}
# icon_template: >-
# {% if states('states.sensor.kiosk_atts.attributes.motionDetectorState') | float == 2 %}
# mdi:motion-sensor
# {% elif states('states.sensor.kiosk_atts.attributes.motionDetectorState') | float == 0 %}
# mdi:sleep
# {% else %}
# mdi:close-circle-outline
# {% endif %}
# kiosk_att_screen:
# friendly_name: "Kiosk Screen On"
# device_class: light
# value_template: >-
# {% if is_state("sensor.kiosk_atts", "True") %}
# On
# {% elif is_state("sensor.kiosk_atts", "False") %}
# Off
# {% else %}
# Unknown
# {% endif %}
# icon_template: >-
# {% if is_state("sensor.kiosk_atts", "True") %}
# mdi:cellphone
# {% elif is_state("sensor.kiosk_atts", "False") %}
# mdi:cellphone-erase
# {% else %}
# mdi:close-circle-outline
# {% endif %}
#Printer
- platform: octoprint
monitored_conditions:
- Printing
- Printing Error
#Mailbox
- platform: mqtt
state_topic: "mailbox-flag/reading"
name: Mailbox Flag
device_class: light
- platform: mqtt
state_topic: "mailbox-green/reading"
name: Mailbox Green Light
device_class: light
- platform: mqtt
state_topic: "mailbox-red/reading"
name: Mailbox Red Light
device_class: light
#OnAir Light Button
- platform: mqtt
state_topic: "onair_switch/set"
name: On Air Switch
device_class: light
#Entry Motion
- platform: mqtt
name: Entry Motion
state_topic: 'lightswitch/reading/current'
value_template: '{{ value_json.motion }}'
payload_on: "motion detected"
payload_off: "standby"
device_class: motion
expire_after: 120
off_delay: 120
#Reef Motion
- platform: mqtt
name: Reef Notify Motion
state_topic: 'notifyscreen/motion'
payload_on: "MOTION"
payload_off: "NO MOTION"
device_class: motion
expire_after: 60
off_delay: 60
#Notifybox Motion
- platform: mqtt
name: Notify Box Motion
state_topic: 'notify_box/motion'
payload_on: "MOTION"
payload_off: "NO MOTION"
device_class: motion
expire_after: 60
off_delay: 60
- platform: mqtt
name: Birdfeed Motion
state_topic: 'homeassistant/binary_sensor/motion_birdfeed/state'
expire_after: 30
off_delay: 30
device_class: motion
- platform: mqtt
name: Bathroom Motion
state_topic: "homeassistant/binary_sensor/motion_bathroom/state"
expire_after: 60
off_delay: 360
device_class: motion
- platform: mqtt
name: Bedroom Motion
state_topic: "homeassistant/binary_sensor/motion_battery/state"
# availability_topic: "homeassistant/binary_sensor/motion_battery/config"
expire_after: 120
off_delay: 120
device_class: motion
#- platform: huesensor
- platform: template
sensors:
garden_sun:
friendly_name: "Garden Grow Lights"
device_class: light
value_template: >-
{% if states('sensor.garden_monitor_light_level') | float > 20 %}
On
{% elif states('sensor.garden_monitor_light_level') | float < 20 %}
Off
{% else %}
Unknown
{% endif %}
icon_template: >-
{% if states('sensor.garden_monitor_light_level') | float > 20 %}
mdi:lightbulb-on
{% elif states('sensor.garden_monitor_light_level') | float < 20 %}
mdi:lightbulb
{% else %}
mdi:close-circle-outline
{% endif %}
garden_reservoir:
friendly_name: "Garden Drain"
device_class: light
value_template: >-
{% if states('sensor.garden_reservoir') | float > 49 %}
On
{% elif states('sensor.garden_reservoir') | float < 49 %}
Off
{% else %}
Unknown
{% endif %}
icon_template: >-
{% if states('sensor.garden_reservoir') | float > 49 %}
mdi:cup-water
{% elif states('sensor.garden_reservoir') | float < 49 %}
mdi:flask-empty-outline
{% else %}
mdi:close-circle-outline
{% endif %}
people_home:
friendly_name: "People Home"
value_template: >-
{{ is_state('person.gabe', 'home') or is_state('input_boolean.guest_mode', 'on') or is_state('person.aaron_2', 'home') }}
recent_motion_trigger:
friendly_name: "Recent Motion Trigger"
value_template: >-
{{ (as_timestamp(now()) - (as_timestamp(states.automation.motion_detection_alert_on.attributes.last_triggered)) < 0) and (as_timestamp(now()) - (as_timestamp(states.automation.motion_detection_alert_on.attributes.last_triggered)) > 64800) }}
water_plant_alarm_ferns:
friendly_name: "Water Alert Ferns"
value_template: >-
{% if states('sensor.plant_monitor_soil_moisture') | float > 16 %}
Off
{% elif states('sensor.plant_monitor_soil_moisture') | float < 16 %}
On
{% else %}
Unknown
{% endif %}
water_alarm_garden_res:
friendly_name: "Water Alert Garden Res"
value_template: >-
{% if states('sensor.garden_monitor_water_level') | float > 60 %}
On
{% elif states('sensor.garden_monitor_water_level') | float < 60 %}
Off
{% else %}
Unknown
{% endif %}