-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscripts.yaml
38 lines (38 loc) · 832 Bytes
/
scripts.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
fan_control:
alias: Fan Control
sequence:
- variables:
presets:
- 'off'
- low
- high
- if:
- condition: template
value_template: '{{ presets.index(preset) > 0 }}'
then:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.wetroom_extractor_low_speed
else:
- service: switch.turn_off
data: {}
target:
entity_id: switch.wetroom_extractor_low_speed
- if:
- condition: template
value_template: '{{ presets.index(preset) > 1 }}'
then:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.wetroom_extractor_boost
else:
- service: switch.turn_off
data: {}
target:
entity_id: switch.wetroom_extractor_boost
mode: single
icon: mdi:fan