-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbinary_sensor.yaml
More file actions
99 lines (96 loc) · 5.28 KB
/
Copy pathbinary_sensor.yaml
File metadata and controls
99 lines (96 loc) · 5.28 KB
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
- platform: template
sensors:
office_motion:
device_class: motion
value_template: "{{ is_state('group.office_motion', 'on') }}"
master_motion:
device_class: motion
value_template: "{{ is_state('group.master_motion', 'on') }}"
m_bath_motion:
device_class: motion
value_template: "{{ is_state('group.m_bath_motion', 'on') }}"
living_motion:
device_class: motion
value_template: "{{ is_state('group.living_motion', 'on') }}"
kitchen_motion:
device_class: motion
value_template: "{{ is_state('group.kitchen_motion', 'on') }}"
living_kitchen_motion:
device_class: motion
value_template: "{{ is_state('group.living_kitchen_motion', 'on') }}"
garage_motion:
device_class: motion
value_template: "{{ is_state('group.garage_motion', 'on') }}"
office_vent:
device_class: window
value_template: "{{ ((states('climate.ac')) | string != 'off') and is_state('cover.office', 'open') }}"
living_vent:
device_class: window
value_template: "{{ ((states('climate.ac')) | string != 'off') and is_state('cover.living', 'open') }}"
master_vent:
device_class: window
value_template: "{{ ((states('climate.ac')) | string != 'off') and is_state('cover.master_bed', 'open') }}"
bed2_vent:
device_class: window
value_template: "{{ ((states('climate.ac')) | string != 'off') and is_state('cover.bed_2', 'open') }}"
bed3_vent:
device_class: window
value_template: "{{ ((states('climate.ac')) | string != 'off') and is_state('cover.bed_3', 'open') }}"
bed4_vent:
device_class: window
value_template: "{{ ((states('climate.ac')) | string != 'off') and is_state('cover.bed_4', 'open') }}"
mad_bed_sensor:
value_template: "{{ states('sensor.mad_bed_sensor_value') | float > -180000 }}"
sam_bed_sensor:
value_template: "{{ states('sensor.sam_bed_sensor_value') | float > 230000 }}"
bed_sensor:
value_template: "{{ is_state('binary_sensor.sam_bed_sensor', 'on') or is_state('binary_sensor.mad_bed_sensor', 'on') }}"
living_music_sensor:
device_class: sound
value_template: "{{ is_state('media_player.living', 'playing') }}"
alfresco_music_sensor:
device_class: sound
value_template: "{{ is_state('media_player.alfresco', 'playing') }}"
sam_wr_motion:
device_class: motion
value_template: "{{ states('sensor.sam_wr_burglar') | float > 0 }}"
living_tv:
device_class: motion
value_template: "{{ is_state('media_player.samsungtv_ade6ef96_9365_40cb_b442_7cfbb076d128','on') }}"
alfresco_iotedge_vision:
device_class: motion
value_template: "{{ is_state('sensor.alfresco_azure_image_processing','on') }}"
lullabies_music_sensor:
device_class: sound
value_template: "{{ is_state('media_player.living', 'playing') and 'Lullabies' in state_attr('media_player.living', 'media_content_id') }}"
montessori_music_sensor:
device_class: sound
value_template: "{{ is_state('media_player.living', 'playing') and 'Montessori' in state_attr('media_player.living', 'media_content_id') }}"
master_wc_mlx90640_thermal_sensor:
device_class: occupancy
value_template: "{{ states('sensor.master_wc_mlx90640_temp_diff') | float > 6.0 }}"
master_bath_mlx90640_thermal_sensor:
device_class: occupancy
value_template: "{{ states('sensor.master_bath_mlx90640_temp_diff') | float > 6.0 }}"
office_cabinet_strips:
value_template: "{{ is_state('group.office_cabinet_strips', 'on') }}"
dryer_running_state:
value_template: "{{ is_state('sensor.fisher_paykel_dryer_d828c9f3fc0c_laundry_machine_state', 'Run') }}"
washer_running_state:
value_template: "{{ is_state('sensor.fisher_paykel_washer_fcb97e3fb7af_laundry_machine_state', 'Run') }}"
grid_high_import:
device_class: power
value_template: "{{ states('sensor.sigen_plant_grid_import_power') | float(0) > 1 and (now().hour >= 15 or now().hour < 9) and is_state('input_boolean.power_notifications', 'on') }}"
# Frigate
frigate_office_desk_camera:
device_class: motion
value_template: "{{ is_state('input_boolean.imageprocessing_sensor', 'on') and states('sensor.frigate_office_desk_camera_value') not in ['unavailable', 'unknown', 'Unknown', 'none'] and states('sensor.frigate_office_desk_camera_value') | float > 0}}"
frigate_living_camera:
device_class: motion
value_template: "{{ is_state('input_boolean.imageprocessing_sensor', 'on') and states('sensor.frigate_living_camera_value') not in ['unavailable', 'unknown', 'Unknown', 'none'] and states('sensor.frigate_living_camera_value') | float > 0}}"
frigate_alfresco_camera:
device_class: motion
value_template: "{{ is_state('input_boolean.imageprocessing_sensor', 'on') and states('sensor.frigate_alfresco_camera_value') not in ['unavailable', 'unknown', 'Unknown', 'none'] and states('sensor.frigate_alfresco_camera_value') | float > 0}}"
istore_running_state:
device_class: running
value_template: "{{ is_state('sensor.istore_running_state', 'On') }}"