Skip to content

Commit a5c5914

Browse files
authored
Fix SYMFONISK v2 remote quirk automation triggers (#4257)
* Fix IKEA Symfonisk remote command name * Use the command name instead of a constant * Remove duplicated cluster * Plural
1 parent 48191cc commit a5c5914

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

zhaquirks/ikea/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
IKEA_SHORTCUT_CLUSTER_V1_ID = 0xFC7F # decimal = 64639 Shortcut V1 commands
2121
IKEA_MATTER_SWITCH_CLUSTER_ID = 0xFC80 # decimal = 64640 Shortcut V2 commands
22-
COMMAND_SHORTCUT_V1 = "shortcut_v1_events"
2322

2423
# PowerConfiguration cluster attributes
2524
BATTERY_VOLTAGE = PowerConfiguration.attributes_by_name["battery_voltage"].id
@@ -61,7 +60,7 @@ class ShortcutV1Cluster(EventableCluster):
6160
class ServerCommandDefs(BaseCommandDefs):
6261
"""Server command definitions."""
6362

64-
shortcut_v1 = foundation.ZCLCommandDef(
63+
shortcut_v1_events = foundation.ZCLCommandDef(
6564
id=0x01,
6665
schema={
6766
"shortcut_button": t.int8s,

zhaquirks/ikea/symfonisk2.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
TOGGLE,
4949
)
5050
from zhaquirks.ikea import (
51-
COMMAND_SHORTCUT_V1,
5251
IKEA,
5352
IKEA_CLUSTER_ID,
5453
WWAH_CLUSTER_ID,
@@ -153,7 +152,6 @@ class IkeaSymfoniskGen2v1(CustomDevice):
153152
PollControl.cluster_id,
154153
LightLink.cluster_id,
155154
WWAH_CLUSTER_ID,
156-
ShortcutV1Cluster,
157155
],
158156
OUTPUT_CLUSTERS: [
159157
Identify.cluster_id,
@@ -174,27 +172,27 @@ class IkeaSymfoniskGen2v1(CustomDevice):
174172
device_automation_triggers.update(
175173
{
176174
(SHORT_PRESS, BUTTON_1): {
177-
COMMAND: COMMAND_SHORTCUT_V1,
175+
COMMAND: ShortcutV1Cluster.ServerCommandDefs.shortcut_v1_events.name,
178176
PARAMS: {"shortcut_button": 1, "shortcut_event": 1},
179177
},
180178
(DOUBLE_PRESS, BUTTON_1): {
181-
COMMAND: COMMAND_SHORTCUT_V1,
179+
COMMAND: ShortcutV1Cluster.ServerCommandDefs.shortcut_v1_events.name,
182180
PARAMS: {"shortcut_button": 1, "shortcut_event": 2},
183181
},
184182
(LONG_PRESS, BUTTON_1): {
185-
COMMAND: COMMAND_SHORTCUT_V1,
183+
COMMAND: ShortcutV1Cluster.ServerCommandDefs.shortcut_v1_events.name,
186184
PARAMS: {"shortcut_button": 1, "shortcut_event": 3},
187185
},
188186
(SHORT_PRESS, BUTTON_2): {
189-
COMMAND: COMMAND_SHORTCUT_V1,
187+
COMMAND: ShortcutV1Cluster.ServerCommandDefs.shortcut_v1_events.name,
190188
PARAMS: {"shortcut_button": 2, "shortcut_event": 1},
191189
},
192190
(DOUBLE_PRESS, BUTTON_2): {
193-
COMMAND: COMMAND_SHORTCUT_V1,
191+
COMMAND: ShortcutV1Cluster.ServerCommandDefs.shortcut_v1_events.name,
194192
PARAMS: {"shortcut_button": 2, "shortcut_event": 2},
195193
},
196194
(LONG_PRESS, BUTTON_2): {
197-
COMMAND: COMMAND_SHORTCUT_V1,
195+
COMMAND: ShortcutV1Cluster.ServerCommandDefs.shortcut_v1_events.name,
198196
PARAMS: {"shortcut_button": 2, "shortcut_event": 3},
199197
},
200198
},

0 commit comments

Comments
 (0)