-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfan.yaml
35 lines (35 loc) · 1.03 KB
/
fan.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
- platform: template
fans:
schlafzimmer_fan:
friendly_name: "Schlafzimmer Ventilator"
value_template: "{{ states('switch.fan_bedroom_status')}}"
turn_on:
- service: switch.turn_on
data:
entity_id: switch.ventilator_licht
- service: switch.turn_on
data:
entity_id: switch.fan_bedroom_status
turn_off:
- service: switch.turn_off
data:
entity_id: switch.ventilator_licht
- service: switch.turn_off
data:
entity_id: switch.fan_bedroom_status
set_speed:
service: scene.turn_on
data_template:
entity_id: >
{% if speeds == '3' %}
scene.ventilator_stufe_3
{% elif speeds == '2' %}
scene.ventilator_stufe_2
{% elif speeds == '1' %}
scene.ventilator_stufe_1
{% else %}
{% endif %}
speeds:
- '1'
- '2'
- '3'