-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ikea_button_z2m.yaml
47 lines (46 loc) · 1.21 KB
/
Ikea_button_z2m.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
blueprint:
name: Cover control with Tradfri open/close remote
description: |
Control a cover with an Ikea Tradfri open/close button remote over ZHA
Short press on ☼ button will open the cover.
Short press on ☰ button will close the cover.
Long press on ☼ or ☰ will stop the cover.
domain: automation
input:
remote:
name: Remote
description: "IKEA open/close remote to use"
selector:
entity:
integration: mqtt
domain: sensor
cover:
name: Cover
description: The cover to control
selector:
target:
entity:
domain: cover
trigger:
- platform: state
entity_id: !input remote
action:
- variables:
command: " {{ trigger.to_state.state }} "
- choose:
- conditions:
- '{{ command == "open" }}'
sequence:
- service: cover.open_cover
target: !input cover
- conditions:
- '{{ command == "close" }}'
sequence:
- service: cover.close_cover
target: !input cover
- conditions:
- '{{ command in ("stop", "stop_opening", "stop_closing") }}'
sequence:
- service: cover.stop_cover
target: !input cover
mode: single