Skip to content

Commit 5a96c15

Browse files
authored
Merge pull request #2634 from SmartThingsCommunity/add/initialpress-to-scroll-subscription
add InitialPress to Ikea Scroll subscription
2 parents ad0923f + 1c8e931 commit 5a96c15

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/fields.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ IkeaScrollFields.ENDPOINT_POWER_SOURCE = 0
1111
-- Switch Endpoints used for basic press functionality
1212
IkeaScrollFields.ENDPOINTS_PRESS = {3, 6, 9}
1313

14-
-- Required Events for the ENDPOINTS_PRESS. Remove the default subscription to
15-
-- InitialPress since this is a MultiPress device and InitialPress will be ignored.
14+
-- Required Events for the ENDPOINTS_PRESS.
1615
IkeaScrollFields.switch_press_subscribed_events = {
16+
clusters.Switch.events.InitialPress.ID,
1717
clusters.Switch.events.MultiPressComplete.ID,
1818
clusters.Switch.events.LongPress.ID,
1919
}

drivers/SmartThings/matter-switch/src/test/test_ikea_scroll.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ local ENDPOINTS_PRESS = { 3, 6, 9 }
127127
-- the ikea scroll subdriver has overriden subscribe behavior
128128
local function ikea_scroll_subscribe()
129129
local CLUSTER_SUBSCRIBE_LIST ={
130+
clusters.Switch.events.InitialPress,
130131
clusters.Switch.server.events.LongPress,
131132
clusters.Switch.server.events.MultiPressComplete,
132133
}

0 commit comments

Comments
 (0)