Skip to content

Commit 0ca61eb

Browse files
committed
ignore InitialPress
1 parent 47c7d1c commit 0ca61eb

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

  • drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers

drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,7 @@ function IkeaScrollEventHandlers.initial_press_handler(driver, device, ib, respo
7070
if switch_utils.tbl_contains(scroll_fields.ENDPOINTS_PUSH, ib.endpoint_id) then
7171
generic_event_handlers.initial_press_handler(driver, device, ib, response)
7272
else
73-
if #response.info_blocks > 1 then
74-
device.log.debug("Received InitialPress event in response with multiple info blocks, ignoring due to event order ambiguity.")
75-
return
76-
end
77-
local latest_presses_handled = device:get_field(scroll_fields.LATEST_NUMBER_OF_PRESSES_HANDLED) or 0
78-
if latest_presses_handled == 0 then
79-
-- the magic number "1" is here since the InitialPress event when presses handled is 0 represents the first press.
80-
device:set_field(scroll_fields.LATEST_NUMBER_OF_PRESSES_HANDLED, 1)
81-
rotate_amount_event_helper(device, ib.endpoint_id, 1)
82-
end
73+
device.log.debug("Received InitialPress event from scroll endpoint, ignoring.")
8374
end
8475
end
8576

0 commit comments

Comments
 (0)