-
Notifications
You must be signed in to change notification settings - Fork 0
/
binary_sensors.yaml
120 lines (116 loc) · 4.69 KB
/
binary_sensors.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
- platform: template
sensors:
no_one_home:
friendly_name: No one is home
value_template: >
{{ not is_state("person.philippe", "home")
and not is_state("person.isabel", "home")
and is_state("binary_sensor.kids_home_alone", "off")
and is_state("binary_sensor.guest_mode", "off")
}}
icon_template: >-
{% if is_state('binary_sensor.no_one_home', 'off') %}
mdi:home
{% else %}
mdi:home-outline
{% endif %}
motion_detected_indoor:
friendly_name: Any indoor motion detected
value_template: >
{{ is_state("binary_sensor.motion_wc_boven", "on")
or is_state("binary_sensor.motion_wc_beneden", "on")
or is_state("binary_sensor.motion_gang_eerste_2", "on")
or is_state("binary_sensor.motion_gang_eerste_1", "on")
or is_state("binary_sensor.motion_inkom_1", "on")
or is_state("binary_sensor.motion_inkom_2", "on")
or is_state("binary_sensor.motion_gang_zolder", "on")
or is_state("binary_sensor.motion_bureau", "on")
or is_state("binary_sensor.motion_dressing", "on")
or is_state("binary_sensor.motion_speelkamer", "on")
or is_state("binary_sensor.motion_woonkamer", "on")
or is_state("binary_sensor.motion_keuken", "on") }}
motion_detected_indoor_in_last_hour:
friendly_name: Any indoor motion detected in last hour
value_template: >
{{ is_state("binary_sensor.motion_detected_indoor", "on") }}
delay_off: "01:00:00"
motion_detected_bureau_in_last_hour:
friendly_name: Any motion detected (bureau) in last hour
value_template: >
{{ is_state("binary_sensor.motion_bureau", "on") }}
delay_off: "01:00:00"
guest_mode:
value_template: "{{ is_state('input_boolean.guest_mode','on') }}"
device_class: presence
friendly_name: "Guest Mode"
kids_home_alone:
value_template: "{{ is_state('input_boolean.kids_home_alone','on') }}"
device_class: presence
friendly_name: "Kids Home Alone"
vacation_mode:
value_template: "{{ is_state('input_boolean.vacation_mode','on') }}"
device_class: presence
friendly_name: "Vacation Mode"
night_mode:
value_template: "{{ is_state('input_boolean.night_mode', 'on') }}"
device_class: moving
friendly_name: "Night Mode"
home_proximity:
value_template: >-
{{ (is_state_attr('proximity.philippe_home','dir_of_travel','towards') and states('proximity.philippe_home') |int (0) <= 2) or
(is_state_attr('proximity.isabel_home','dir_of_travel','towards') and states('proximity.isabel_home') |int (0) <= 2)}}
motion_inkom:
friendly_name: Inkom
value_template: >
{{ is_state("binary_sensor.motion_inkom_1", "on") or is_state("binary_sensor.motion_inkom_2", "on")}}
device_class: motion
motion_gang_eerste:
friendly_name: Gang Eerste
value_template: >
{{ is_state("binary_sensor.motion_gang_eerste_1", "on") or is_state("binary_sensor.motion_gang_eerste_2", "on")}}
device_class: motion
motion_achter:
friendly_name: Motion Achter
value_template: >
{{ is_state('binary_sensor.motion_achterdeur', 'on') or is_state('binary_sensor.achterdeur', 'on') or is_state('binary_sensor.keukendeur', 'on')}}
device_class: motion
motion_voor:
friendly_name: Motion Voor
value_template: >
{{ is_state('binary_sensor.motion_voordeur', 'on') or is_state('binary_sensor.voordeur', 'on') }}
device_class: motion
school_vacation:
friendly_name: School Vakantie
value_template: "{{ is_state('input_boolean.school_vacation','on') }}"
- platform: workday
country: BE
- platform: workday
name: Schooldag
country: BE
add_holidays:
- "2022-10-03"
- "2022-10-05"
- platform: template
sensors:
oprit_motion:
friendly_name: "Oprit Motion"
value_template: '{{ is_state(''input_boolean.oprit_motion'', ''on'') }}'
device_class: motion
oprit_known_plate:
friendly_name: "Oprit Known Plate"
value_template: !secret known_car_plate_template
- platform: template
sensors:
plant_attention:
value_template: >-
{% set attention_requered = namespace(value=false) %}
{% for plant in states.plant %}
{% if 'moisture low' in plant.attributes.problem %}
{% set attention_requered.value = true %}
{% endif %}
{% if 'conductivity low' in plant.attributes.problem %}
{% set attention_requered.value = true %}
{% endif %}
{% endfor %}
{{ attention_requered.value }}
device_class: problem