-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmoes2gang.yaml
119 lines (119 loc) · 3.23 KB
/
moes2gang.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
blueprint:
name: Zigbee2MQTT - Moes 2 Gang Switch
description: Control lights with a Moes 2 Gang Switch. Triggered by MQTT Events. Designed by Kastu.
domain: automation
input:
remote:
name: Moes 2 Gang Switch
description: Pick TS0042
selector:
device:
integration: mqtt
manufacturer: Tuya
entity:
- domain:
- sensor
device_class:
- battery
multiple: false
light:
name: Light(s)
description: The light(s) to control with left button
selector:
target:
entity:
- domain:
- light
light2:
name: Light(s)
description: The light(s) to control with right button
selector:
target:
entity:
- domain:
- light
force_brightness:
name: Force turn on brightness
description: 'Force the brightness to the set level below, when the "on" button
on the remote is pushed and lights turn on.'
default: false
selector:
boolean: {}
brightness:
name: Brightness
description: Brightness of the light(s) when turning on
default: 100
selector:
number:
min: 0.0
max: 100.0
mode: slider
step: 1.0
unit_of_measurement: '%'
base_topic:
name: Z2M Base mqtt topic
description: The base topic z2m
default: 'zigbee2mqtt'
controller:
name: Z2M Controller Name
description: The name of the device, copy and past from the remote name if they are the same as within Zigbee2MQTT
default: 'Remote Controller Sofa Lights'
mode: restart
max_exceeded: silent
trigger_variables:
base_topic: !input base_topic
force_brightness: !input force_brightness
controller: !input controller
trigger:
- platform: mqtt
topic: "{{ base_topic }}/{{ controller }}/action"
action:
choose:
- conditions:
- condition: template
value_template: '{{ trigger.payload == "1_single" }}'
sequence:
- service: light.toggle
target: !input light
data:
transition: 1
- conditions:
- condition: template
value_template: '{{ trigger.payload == "1_double" }}'
sequence:
- service: light.toggle
target: !input light
data:
transition: 1
- conditions:
- condition: template
value_template: '{{ trigger.payload == "1_hold" }}'
sequence:
- service: light.toggle
target: !input light
data:
transition: 1
- conditions:
- condition: template
value_template: '{{ trigger.payload == "2_single" }}'
sequence:
- service: light.toggle
target: !input light2
data:
transition: 1
- conditions:
- condition: template
value_template: '{{ trigger.payload == "2_double" }}'
sequence:
- service: light.toggle
target: !input light
data:
transition: 1
- conditions:
- condition: template
value_template: '{{ trigger.payload == "2_hold" }}'
sequence:
- service: light.toggle
target: !input light
data:
transition: 1