-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinary_sensor.yaml
28 lines (27 loc) · 924 Bytes
/
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
---
################################################################################
# binary_sensor.yaml
# https://www.home-assistant.io/integrations/binary_sensor/
################################################################################
# OpenGarage Sensors
# https://www.home-assistant.io/integrations/opengarage/
- platform: template
sensors:
garage_door_occupied:
friendly_name: "Car in Garage"
value_template: "{{ states('sensor.og_01_dist') | int < 180 }}"
availability_template: >-
{% if is_state('cover.garage_door','closed') %}
true
{% else %}
unavailable
{% endif %}
icon_template: >-
{% if is_state('binary_sensor.garage_door_occupied','on') %}
mdi:car
{% else %}
mdi:car-arrow-right
{% endif %}
unique_id: binary_sensor.garage_door_occupied
delay_on: 5
delay_off: 5