forked from romquenin/home-assistant-config-fr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfan_dyson.yaml
executable file
·56 lines (49 loc) · 1.45 KB
/
fan_dyson.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
############################################################
## ##
## FAN DYSON ##
## ##
############################################################
input_boolean:
fan:
name: Fan
initial: off
script:
'ventilateur_rotation_on':
alias: '[Dyson] rotation on'
sequence:
- data:
entity_id: fan.dyson_pure_cool_linktm
oscillating: 'true'
service: fan.oscillate
'ventilateur_rotation_off':
alias: '[Dyson] rotation off'
sequence:
- data:
entity_id: fan.dyson_pure_cool_linktm
oscillating: 'false'
service: fan.oscillate
sensor:
- platform: template
sensors:
vitesse_ventilateur:
friendly_name: Vitesse ventilateur
value_template: '{{ state_attr(''fan.dyson_pure_cool_linktm'', ''dyson_speed'') }}'
automation:
- alias: '[Dyson] Rotation On'
initial_state: on
trigger:
- platform: state
entity_id: input_boolean.fan
to: 'on'
action:
- service: script.turn_on
entity_id: script.ventilateur_rotation_on
- alias: '[Dyson] Rotation Off'
initial_state: on
trigger:
- platform: state
entity_id: input_boolean.fan
to: 'off'
action:
- service: script.turn_on
entity_id: script.ventilateur_rotation_off