-
Notifications
You must be signed in to change notification settings - Fork 1
/
switches.yaml
88 lines (87 loc) · 3.55 KB
/
switches.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
# Aarlo
- platform: aarlo
siren: true
snapshot: true
siren_volume: 6
siren_duration: 10
# Sonair CO₂-sensor toggles. There's no way to detect when the CO₂-sensor is
# enabled/disabled outside of Home Assistant, so this only works (well) when no
# external changes are made...
- platform: template
switches:
# Wardrobe
co2_sensor_sonair_wardrobe:
friendly_name: CO₂-sensor (Sonair – Wardrobe)
unique_id: 35f3bbd9-052c-48b0-9b0c-990546942187
icon_template: mdi:molecule-co2
# The sensor can only be enabled if the Sonair-unit itself is/appears on
value_template: >-
{{
states('switch.smart_plug_27') == 'on' and
states('sensor.speed_sonair_wardrobe') | int(0) > 0 and
states('input_boolean.co2_sensor_sonair_wardrobe')
}}
turn_on:
- service: script.sonair_co2_turn_on
data:
switch_entity_id: switch.smart_plug_27
speed_entity_id: sensor.speed_sonair_wardrobe
boolean_entity_id: input_boolean.co2_sensor_sonair_wardrobe
remote_entity_id: remote.broadlink_wardrobe_remote
turn_off:
- service: script.sonair_co2_turn_off
data:
switch_entity_id: switch.smart_plug_27
speed_entity_id: sensor.speed_sonair_wardrobe
boolean_entity_id: input_boolean.co2_sensor_sonair_wardrobe
remote_entity_id: remote.broadlink_wardrobe_remote
# Living room
co2_sensor_sonair_living_room:
friendly_name: CO₂-sensor (Sonair – Living room)
unique_id: e5d39095-6221-4353-bf69-9111cd39a939
icon_template: mdi:molecule-co2
value_template: >-
{{
states('switch.smart_plug_28') == 'on' and
states('sensor.speed_sonair_living_room') | int(0) > 0 and
states('input_boolean.co2_sensor_sonair_living_room')
}}
turn_on:
- service: script.sonair_co2_turn_on
data:
switch_entity_id: switch.smart_plug_28
speed_entity_id: sensor.speed_sonair_living_room
boolean_entity_id: input_boolean.co2_sensor_sonair_living_room
remote_entity_id: remote.broadlink_living_room_remote
turn_off:
- service: script.sonair_co2_turn_off
data:
switch_entity_id: switch.smart_plug_28
speed_entity_id: sensor.speed_sonair_living_room
boolean_entity_id: input_boolean.co2_sensor_sonair_living_room
remote_entity_id: remote.broadlink_living_room_remote
# Guestroom
co2_sensor_sonair_guestroom:
friendly_name: CO₂-sensor (Sonair – Guestroom)
unique_id: 10598aa9-09de-4b7c-90cd-199ad8ff2c45
icon_template: mdi:molecule-co2
value_template: >-
{{
states('switch.smart_plug_18') == 'on' and
states('sensor.speed_sonair_guestroom') | int(0) > 0 and
states('input_boolean.co2_sensor_sonair_guestroom')
}}
turn_on:
- service: script.sonair_co2_turn_on
data:
switch_entity_id: switch.smart_plug_18
speed_entity_id: sensor.speed_sonair_guestroom
boolean_entity_id: input_boolean.co2_sensor_sonair_guestroom
remote_entity_id: remote.broadlink_guestroom_remote
turn_off:
- service: script.sonair_co2_turn_off
data:
switch_entity_id: switch.smart_plug_18
speed_entity_id: sensor.speed_sonair_guestroom
boolean_entity_id: input_boolean.co2_sensor_sonair_guestroom
remote_entity_id: remote.broadlink_guestroom_remote