From dfa35d3f2c47ba66b876fddbdd28394d1d0732c8 Mon Sep 17 00:00:00 2001 From: Harrison Carter Date: Tue, 16 Dec 2025 11:47:00 -0600 Subject: [PATCH 1/7] initial knob and stateless capability support --- .../matter-switch/capabilities/knob.yml | 24 +++++++++++ .../statelessColorTemperatureStep.yml | 14 +++++++ .../capabilities/statelessSwitchLevelStep.yml | 14 +++++++ drivers/SmartThings/matter-switch/config.yml | 4 +- .../matter-switch/profiles/ikea-scroll.yml | 6 +++ .../profiles/light-color-level-ikea.yml | 30 +++++++++++++ .../SmartThings/matter-switch/src/init.lua | 6 +++ .../src/sub_drivers/ikea_scroll/init.lua | 10 +++++ .../scroll_handlers/event_handlers.lua | 42 +++++++++++++++++++ .../scroll_utils/device_configuration.lua | 10 +++-- .../ikea_scroll/scroll_utils/fields.lua | 27 ++++++++++-- .../ikea_scroll/scroll_utils/utils.lua | 17 +++++++- .../switch_handlers/capability_handlers.lua | 26 ++++++++++++ .../matter-switch/src/switch_utils/utils.lua | 20 ++++++--- .../src/test/test_ikea_scroll.lua | 6 +-- 15 files changed, 237 insertions(+), 19 deletions(-) create mode 100644 drivers/SmartThings/matter-switch/capabilities/knob.yml create mode 100644 drivers/SmartThings/matter-switch/capabilities/statelessColorTemperatureStep.yml create mode 100644 drivers/SmartThings/matter-switch/capabilities/statelessSwitchLevelStep.yml create mode 100644 drivers/SmartThings/matter-switch/profiles/light-color-level-ikea.yml create mode 100644 drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua diff --git a/drivers/SmartThings/matter-switch/capabilities/knob.yml b/drivers/SmartThings/matter-switch/capabilities/knob.yml new file mode 100644 index 0000000000..25da49c074 --- /dev/null +++ b/drivers/SmartThings/matter-switch/capabilities/knob.yml @@ -0,0 +1,24 @@ +name: Knob +status: proposed +attributes: + rotateAmount: + schema: + $ref: RelativeStep + heldRotateAmount: + schema: + $ref: RelativeStep + supportedAttributes: + schema: + type: object + additionalProperties: false + properties: + value: + type: array + items: + type: string + enum: + - rotateAmount + - heldRotateAmount +commands: {} +id: knob +version: 1 \ No newline at end of file diff --git a/drivers/SmartThings/matter-switch/capabilities/statelessColorTemperatureStep.yml b/drivers/SmartThings/matter-switch/capabilities/statelessColorTemperatureStep.yml new file mode 100644 index 0000000000..cdcb27c57a --- /dev/null +++ b/drivers/SmartThings/matter-switch/capabilities/statelessColorTemperatureStep.yml @@ -0,0 +1,14 @@ +name: Stateless Color Temperature Step +status: proposed +commands: + stepColorTemperatureByPercent: + arguments: + - name: stepSize + schema: + type: integer + minimum: -100 + maximum: 100 + optional: false + name: stepColorTemperatureByPercent +id: statelessColorTemperatureStep +version: 1 \ No newline at end of file diff --git a/drivers/SmartThings/matter-switch/capabilities/statelessSwitchLevelStep.yml b/drivers/SmartThings/matter-switch/capabilities/statelessSwitchLevelStep.yml new file mode 100644 index 0000000000..c8eae8da43 --- /dev/null +++ b/drivers/SmartThings/matter-switch/capabilities/statelessSwitchLevelStep.yml @@ -0,0 +1,14 @@ +name: Stateless Switch Level Step +status: proposed +commands: + stepLevel: + arguments: + - name: stepSize + schema: + type: integer + minimum: -100 + maximum: 100 + optional: false + name: stepLevel +id: statelessSwitchLevelStep +version: 1 \ No newline at end of file diff --git a/drivers/SmartThings/matter-switch/config.yml b/drivers/SmartThings/matter-switch/config.yml index 879613d153..5bb8763a36 100644 --- a/drivers/SmartThings/matter-switch/config.yml +++ b/drivers/SmartThings/matter-switch/config.yml @@ -1,5 +1,5 @@ -name: 'Matter Switch' -packageKey: 'matter-switch' +name: 'Matter Switch Scroll' +packageKey: 'matter-switch-scroll' permissions: matter: {} description: "SmartThings driver for Matter switch devices" diff --git a/drivers/SmartThings/matter-switch/profiles/ikea-scroll.yml b/drivers/SmartThings/matter-switch/profiles/ikea-scroll.yml index 4dc77d026d..cce4b68d2d 100644 --- a/drivers/SmartThings/matter-switch/profiles/ikea-scroll.yml +++ b/drivers/SmartThings/matter-switch/profiles/ikea-scroll.yml @@ -5,6 +5,8 @@ components: capabilities: - id: button version: 1 + - id: knob + version: 1 - id: battery version: 1 - id: firmwareUpdate @@ -18,6 +20,8 @@ components: capabilities: - id: button version: 1 + - id: knob + version: 1 categories: - name: RemoteController - id: group3 @@ -25,5 +29,7 @@ components: capabilities: - id: button version: 1 + - id: knob + version: 1 categories: - name: RemoteController diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level-ikea.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level-ikea.yml new file mode 100644 index 0000000000..b562491638 --- /dev/null +++ b/drivers/SmartThings/matter-switch/profiles/light-color-level-ikea.yml @@ -0,0 +1,30 @@ +name: light-color-level-ikea +components: +- id: main + capabilities: + - id: switch + version: 1 + - id: switchLevel + version: 1 + config: + values: + - key: "level.value" + range: [1, 100] + - id: statelessSwitchLevelStep + version: 1 + - id: colorTemperature + version: 1 + config: + values: + - key: "colorTemperature.value" + range: [ 2200, 6500 ] + - id: statelessColorTemperatureStep + version: 1 + - id: colorControl + version: 1 + - id: firmwareUpdate + version: 1 + - id: refresh + version: 1 + categories: + - name: Light diff --git a/drivers/SmartThings/matter-switch/src/init.lua b/drivers/SmartThings/matter-switch/src/init.lua index 5436d57baf..c3f2bcafe2 100644 --- a/drivers/SmartThings/matter-switch/src/init.lua +++ b/drivers/SmartThings/matter-switch/src/init.lua @@ -286,6 +286,12 @@ local matter_driver_template = { [capabilities.level.ID] = { [capabilities.level.commands.setLevel.NAME] = capability_handlers.handle_set_level }, + [capabilities.statelessColorTemperatureStep.ID] = { + [capabilities.statelessColorTemperatureStep.commands.stepColorTemperatureByPercent.NAME] = capability_handlers.handle_step_color_temperature_by_percent, + }, + [capabilities.statelessSwitchLevelStep.ID] = { + [capabilities.statelessSwitchLevelStep.commands.stepLevel.NAME] = capability_handlers.handle_step_level, + }, [capabilities.switch.ID] = { [capabilities.switch.commands.off.NAME] = capability_handlers.handle_switch_off, [capabilities.switch.commands.on.NAME] = capability_handlers.handle_switch_on, diff --git a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua index 6e21a56ac0..83e324a19f 100644 --- a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua +++ b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua @@ -1,9 +1,11 @@ -- Copyright © 2025 SmartThings, Inc. -- Licensed under the Apache License, Version 2.0 +local clusters = require "st.matter.clusters" local switch_utils = require "switch_utils.utils" local scroll_utils = require "sub_drivers.ikea_scroll.scroll_utils.utils" local scroll_cfg = require "sub_drivers.ikea_scroll.scroll_utils.device_configuration" +local event_handlers = require "sub_drivers.ikea_scroll.scroll_handlers.event_handlers" local IkeaScrollLifecycleHandlers = {} @@ -44,6 +46,14 @@ local ikea_scroll_handler = { infoChanged = IkeaScrollLifecycleHandlers.info_changed, init = IkeaScrollLifecycleHandlers.device_init, }, + matter_handlers = { + event = { + [clusters.Switch.ID] = { + [clusters.Switch.events.InitialPress.ID] = event_handlers.initial_press_handler, + [clusters.Switch.events.MultiPressOngoing.ID] = event_handlers.multi_press_ongoing_handler, + } + } + }, can_handle = require("sub_drivers.ikea_scroll.can_handle") } diff --git a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua new file mode 100644 index 0000000000..4b80bcbb61 --- /dev/null +++ b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua @@ -0,0 +1,42 @@ +-- Copyright © 2025 SmartThings, Inc. +-- Licensed under the Apache License, Version 2.0 + +local st_utils = require "st.utils" +local capabilities = require "st.capabilities" +local switch_utils = require "switch_utils.utils" +local generic_event_handlers = require "switch_handlers.event_handlers" +local scroll_fields = require "sub_drivers.ikea_scroll.scroll_utils.fields" + +local IkeaScrollEventHandlers = {} + +local function rotate_amount_event_helper(device, endpoint_id, num_presses_to_handle) + -- to cut down on checks, we can assume that if the endpoint is not in ENDPOINTS_UP_SCROLL, it is in ENDPOINTS_DOWN_SCROLL + local scroll_direction = switch_utils.tbl_contains(scroll_fields.ENDPOINTS_UP_SCROLL, endpoint_id) and 1 or -1 + local scroll_amount = st_utils.clamp_value(scroll_direction * scroll_fields.PER_SCROLL_EVENT_ROTATION * num_presses_to_handle, -100, 100) + device:emit_event_for_endpoint(endpoint_id, capabilities.knob.rotateAmount(scroll_amount, {state_change = true})) +end + +-- Used by ENDPOINTS_UP_SCROLL and ENDPOINTS_DOWN_SCROLL, not ENDPOINTS_PUSH +function IkeaScrollEventHandlers.initial_press_handler(driver, device, ib, response) + -- use the generic handler logic for the push endpoints. Else, use custom logic. + if switch_utils.tbl_contains(ib.endpoint_id, scroll_fields.ENDPOINTS_PUSH) then + generic_event_handlers.initial_press_handler(driver, device. ib, response) + else + device:set_field(scroll_fields.LATEST_NUMBER_OF_PRESSES_COUNTED, 1) + rotate_amount_event_helper(device, ib.endpoint_id, 1) + end + + generic_event_handlers.initial_press_handler(driver, device. ib, response) +end + +-- Used by ENDPOINTS_UP_SCROLL and ENDPOINTS_DOWN_SCROLL, not ENDPOINTS_PUSH +function IkeaScrollEventHandlers.multi_press_ongoing_handler(driver, device, ib, response) + local cur_num_presses_counted = ib.data and ib.data.elements and ib.data.elements.current_number_of_presses_counted.value or 0 + local num_presses_to_handle = cur_num_presses_counted - (device:get_field(scroll_fields.LATEST_NUMBER_OF_PRESSES_COUNTED) or 0) + if num_presses_to_handle > 0 then + device:set_field(scroll_fields.LATEST_NUMBER_OF_PRESSES_COUNTED, cur_num_presses_counted) + rotate_amount_event_helper(device, ib.endpoint_id, num_presses_to_handle) + end +end + +return IkeaScrollEventHandlers diff --git a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/device_configuration.lua b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/device_configuration.lua index cd2cee49ce..1d88a2f3a3 100644 --- a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/device_configuration.lua +++ b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/device_configuration.lua @@ -11,18 +11,20 @@ local IkeaScrollConfiguration = {} function IkeaScrollConfiguration.build_button_component_map(device) local component_map = { - main = scroll_fields.ENDPOINTS_PRESS[1], - group2 = scroll_fields.ENDPOINTS_PRESS[2], - group3 = scroll_fields.ENDPOINTS_PRESS[3], + main = {scroll_fields.ENDPOINTS_PUSH[1], scroll_fields.ENDPOINTS_UP_SCROLL[1], scroll_fields.ENDPOINTS_DOWN_SCROLL[1]}, + group2 = {scroll_fields.ENDPOINTS_PUSH[2], scroll_fields.ENDPOINTS_UP_SCROLL[2], scroll_fields.ENDPOINTS_DOWN_SCROLL[2]}, + group3 = {scroll_fields.ENDPOINTS_PUSH[3], scroll_fields.ENDPOINTS_UP_SCROLL[3], scroll_fields.ENDPOINTS_DOWN_SCROLL[3]}, } device:set_field(switch_fields.COMPONENT_TO_ENDPOINT_MAP, component_map, {persist = true}) end function IkeaScrollConfiguration.configure_buttons(device) - for _, ep in ipairs(scroll_fields.ENDPOINTS_PRESS) do + for _, ep in ipairs(scroll_fields.ENDPOINTS_PUSH) do device:send(clusters.Switch.attributes.MultiPressMax:read(device, ep)) switch_utils.set_field_for_endpoint(device, switch_fields.SUPPORTS_MULTI_PRESS, ep, true, {persist = true}) device:emit_event_for_endpoint(ep, capabilities.button.button.pushed({state_change = false})) + -- though unrelated to the knob capability, the push endpoints all map to components including a knob + device:emit_event_for_endpoint(ep, capabilities.knob.supportedAttributes({"rotateAmount"}, {visibility = {displayed = false}})) end end diff --git a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/fields.lua b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/fields.lua index fff0a1cce4..b5f4e2be4c 100644 --- a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/fields.lua +++ b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/fields.lua @@ -1,6 +1,7 @@ -- Copyright © 2025 SmartThings, Inc. -- Licensed under the Apache License, Version 2.0 +local st_utils = require "st.utils" local clusters = require "st.matter.clusters" local IkeaScrollFields = {} @@ -8,14 +9,34 @@ local IkeaScrollFields = {} -- PowerSource supported on Root Node IkeaScrollFields.ENDPOINT_POWER_SOURCE = 0 --- Switch Endpoints used for basic press functionality -IkeaScrollFields.ENDPOINTS_PRESS = {3, 6, 9} +-- Generic Switch Endpoints used for basic push functionality +IkeaScrollFields.ENDPOINTS_PUSH = {3, 6, 9} --- Required Events for the ENDPOINTS_PRESS. +-- Generic Switch Endpoints used for Up Scroll functionality +IkeaScrollFields.ENDPOINTS_UP_SCROLL = {1, 4, 7} + +-- Generic Switch Endpoints used for Down Scroll functionality +IkeaScrollFields.ENDPOINTS_DOWN_SCROLL = {2, 5, 8} + +IkeaScrollFields.MAX_SCROLL_PRESSES = 18 +IkeaScrollFields.PER_SCROLL_EVENT_ROTATION = st_utils.round(1 / IkeaScrollFields.MAX_SCROLL_PRESSES * 100) + +IkeaScrollFields.LATEST_NUMBER_OF_PRESSES_COUNTED = "__latest_number_of_presses_counted" + +-- Required Events for the ENDPOINTS_PUSH. IkeaScrollFields.switch_press_subscribed_events = { clusters.Switch.events.InitialPress.ID, clusters.Switch.events.MultiPressComplete.ID, clusters.Switch.events.LongPress.ID, } +-- Required Events for the ENDPOINTS_UP_SCROLL and ENDPOINTS_DOWN_SCROLL. Adds a +-- MultiPressOngoing subscription to handle step functionality in real-time, and +-- removes MultiPressComplete subscription due to the real-time handling +IkeaScrollFields.switch_scroll_subscribed_events = { + clusters.Switch.events.InitialPress.ID, + clusters.Switch.events.MultiPressOngoing.ID, +} + + return IkeaScrollFields diff --git a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/utils.lua b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/utils.lua index 67ba2acba5..7f41438930 100644 --- a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/utils.lua +++ b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/utils.lua @@ -8,11 +8,24 @@ local scroll_fields = require "sub_drivers.ikea_scroll.scroll_utils.fields" local IkeaScrollUtils = {} -- override subscribe function to prevent subscribing to additional events from the main driver +-- and to subscribe to extra events for particular endpoints function IkeaScrollUtils.subscribe(device) local subscribe_request = im.InteractionRequest(im.InteractionRequest.RequestType.SUBSCRIBE, {}) - for _, ep_press in ipairs(scroll_fields.ENDPOINTS_PRESS) do + for _, ep_push in ipairs(scroll_fields.ENDPOINTS_PUSH) do for _, switch_event in ipairs(scroll_fields.switch_press_subscribed_events) do - local ib = im.InteractionInfoBlock(ep_press, clusters.Switch.ID, nil, switch_event) + local ib = im.InteractionInfoBlock(ep_push, clusters.Switch.ID, nil, switch_event) + subscribe_request:with_info_block(ib) + end + end + for _, ep_up in ipairs(scroll_fields.ENDPOINTS_UP_SCROLL) do + for _, switch_event in ipairs(scroll_fields.switch_scroll_subscribed_events) do + local ib = im.InteractionInfoBlock(ep_up, clusters.Switch.ID, nil, switch_event) + subscribe_request:with_info_block(ib) + end + end + for _, ep_down in ipairs(scroll_fields.ENDPOINTS_DOWN_SCROLL) do + for _, switch_event in ipairs(scroll_fields.switch_scroll_subscribed_events) do + local ib = im.InteractionInfoBlock(ep_down, clusters.Switch.ID, nil, switch_event) subscribe_request:with_info_block(ib) end end diff --git a/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua b/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua index 2c5241de3a..e985f24962 100644 --- a/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua +++ b/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua @@ -47,6 +47,17 @@ function CapabilityHandlers.handle_switch_set_level(driver, device, cmd) end +-- [[ STATELESS SWITCH LEVEL STEP CAPABILITY COMMANDS ]] -- + +function CapabilityHandlers.handle_step_level(driver, device, cmd) + local step_size = math.floor((cmd.args and cmd.args.stepSize or 0)/100.0 * 254) + if step_size == 0 then return end + local endpoint_id = device:component_to_endpoint(cmd.component) + local step_mode = step_size > 0 and clusters.LevelControl.types.StepMode.UP or clusters.LevelControl.types.StepMode.DOWN + device:send(clusters.LevelControl.server.commands.Step(device, endpoint_id, step_mode, math.abs(step_size), fields.TRANSITION_TIME, fields.OPTIONS_MASK, fields.OPTIONS_OVERRIDE)) +end + + -- [[ COLOR CONTROL CAPABILITY COMMANDS ]] -- function CapabilityHandlers.handle_set_color(driver, device, cmd) @@ -109,6 +120,21 @@ function CapabilityHandlers.handle_set_color_temperature(driver, device, cmd) end +-- [[ STATELESS COLOR TEMPERATURE STEP CAPABILITY COMMANDS ]] -- + +function CapabilityHandlers.handle_step_color_temperature_by_percent(driver, device, cmd) + local step_percent_change = cmd.args and cmd.args.stepSize or 0 + if step_percent_change == 0 then return end + local endpoint_id = device:component_to_endpoint(cmd.component) + -- before the Matter 1.3 lua libs update (HUB FW 55), there was no ColorControl StepModeEnum type defined + local step_mode = step_percent_change > 0 and (clusters.ColorControl.types.StepModeEnum.DOWN or 3) or (clusters.ColorControl.types.StepModeEnum.UP or 1) + local min_mireds = switch_utils.get_field_for_endpoint(device, fields.COLOR_TEMP_BOUND_RECEIVED_MIRED..fields.COLOR_TEMP_MIN, endpoint_id) or 2200 -- default min mireds + local max_mireds = switch_utils.get_field_for_endpoint(device, fields.COLOR_TEMP_BOUND_RECEIVED_MIRED..fields.COLOR_TEMP_MAX, endpoint_id) or 6500 -- default max mireds + local color_change_in_mireds = st_utils.round((max_mireds - min_mireds) * (math.abs(step_percent_change)/100)) + device:send(clusters.ColorControl.server.commands.StepColorTemperature(device, endpoint_id, step_mode, color_change_in_mireds, fields.TRANSITION_TIME, min_mireds, max_mireds, fields.OPTIONS_MASK, fields.OPTIONS_OVERRIDE)) +end + + -- [[ VALVE CAPABILITY COMMANDS ]] -- function CapabilityHandlers.handle_valve_open(driver, device, cmd) diff --git a/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua b/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua index b258688234..91eb4a8cc2 100644 --- a/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua +++ b/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua @@ -201,7 +201,8 @@ end --- An extension of the library function endpoint_to_component, used to support a mapping scheme --- that optionally includes cluster and attribute ids so that multiple components can be mapped ---- to a single endpoint. +--- to a single endpoint. This extension also handles the case that multiple endpoints map to the +--- same component --- --- @param device any a Matter device object --- @param ep_info number|table either an ep_id or a table { endpoint_id, optional(cluster_id), optional(attribute_id) } @@ -214,10 +215,19 @@ function utils.endpoint_to_component(device, ep_info) for component, map_info in pairs(device:get_field(fields.COMPONENT_TO_ENDPOINT_MAP) or {}) do if type(map_info) == "number" and map_info == ep_info.endpoint_id then return component - elseif type(map_info) == "table" and map_info.endpoint_id == ep_info.endpoint_id - and (not map_info.cluster_id or (map_info.cluster_id == ep_info.cluster_id - and (not map_info.attribute_ids or utils.tbl_contains(map_info.attribute_ids, ep_info.attribute_id)))) then - return component + elseif type(map_info) == "table" then + if type(map_info.endpoint_id) == "number" then + map_info = {map_info} + end + for _, ep_map_info in ipairs(map_info) do + if type(ep_map_info) == "number" and ep_map_info == ep_info.endpoint_id then + return component + elseif type(ep_map_info) == "table" and ep_map_info.endpoint_id == ep_info.endpoint_id + and (not ep_map_info.cluster_id or (ep_map_info.cluster_id == ep_info.cluster_id + and (not ep_map_info.attribute_ids or utils.tbl_contains(ep_map_info.attribute_ids, ep_info.attribute_id)))) then + return component + end + end end end return "main" diff --git a/drivers/SmartThings/matter-switch/src/test/test_ikea_scroll.lua b/drivers/SmartThings/matter-switch/src/test/test_ikea_scroll.lua index c560386e37..f5c75066c1 100644 --- a/drivers/SmartThings/matter-switch/src/test/test_ikea_scroll.lua +++ b/drivers/SmartThings/matter-switch/src/test/test_ikea_scroll.lua @@ -122,7 +122,7 @@ local mock_ikea_scroll = test.mock_device.build_test_matter_device({ } }) -local ENDPOINTS_PRESS = { 3, 6, 9 } +local ENDPOINTS_PUSH = { 3, 6, 9 } -- the ikea scroll subdriver has overriden subscribe behavior local function ikea_scroll_subscribe() @@ -131,8 +131,8 @@ local function ikea_scroll_subscribe() clusters.Switch.server.events.LongPress, clusters.Switch.server.events.MultiPressComplete, } - local subscribe_request = CLUSTER_SUBSCRIBE_LIST[1]:subscribe(mock_ikea_scroll, ENDPOINTS_PRESS[1]) - for _, ep_press in ipairs(ENDPOINTS_PRESS) do + local subscribe_request = CLUSTER_SUBSCRIBE_LIST[1]:subscribe(mock_ikea_scroll, ENDPOINTS_PUSH[1]) + for _, ep_press in ipairs(ENDPOINTS_PUSH) do for _, event in ipairs(CLUSTER_SUBSCRIBE_LIST) do subscribe_request:merge(event:subscribe(mock_ikea_scroll, ep_press)) end From 0247d4a8f9755b6c353e95857852f9fe525f41a0 Mon Sep 17 00:00:00 2001 From: Harrison Carter Date: Tue, 16 Dec 2025 12:46:57 -0600 Subject: [PATCH 2/7] revert config file to original packaging --- drivers/SmartThings/matter-switch/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/SmartThings/matter-switch/config.yml b/drivers/SmartThings/matter-switch/config.yml index 5bb8763a36..879613d153 100644 --- a/drivers/SmartThings/matter-switch/config.yml +++ b/drivers/SmartThings/matter-switch/config.yml @@ -1,5 +1,5 @@ -name: 'Matter Switch Scroll' -packageKey: 'matter-switch-scroll' +name: 'Matter Switch' +packageKey: 'matter-switch' permissions: matter: {} description: "SmartThings driver for Matter switch devices" From 628428ee2d94588cdca46341a10505f8bf9ffe72 Mon Sep 17 00:00:00 2001 From: Harrison Carter Date: Tue, 16 Dec 2025 20:06:57 -0600 Subject: [PATCH 3/7] update all profiles --- drivers/SmartThings/matter-switch/profiles/ikea-scroll.yml | 6 ------ .../profiles/light-color-level-1800K-6500K.yml | 4 ++++ .../profiles/light-color-level-2000K-7000K.yml | 4 ++++ .../profiles/light-color-level-2200K-6500K.yml | 4 ++++ .../profiles/light-color-level-2700K-6500K.yml | 4 ++++ .../matter-switch/profiles/light-color-level-fan.yml | 4 ++++ .../light-color-level-illuminance-motion-1000K-15000K.yml | 4 ++++ .../profiles/light-color-level-illuminance-motion.yml | 4 ++++ .../matter-switch/profiles/light-color-level.yml | 4 ++++ .../matter-switch/profiles/light-level-2-button.yml | 2 ++ .../matter-switch/profiles/light-level-3-button.yml | 2 ++ .../matter-switch/profiles/light-level-4-button.yml | 2 ++ .../matter-switch/profiles/light-level-5-button.yml | 2 ++ .../matter-switch/profiles/light-level-6-button.yml | 2 ++ .../matter-switch/profiles/light-level-7-button.yml | 2 ++ .../matter-switch/profiles/light-level-8-button.yml | 2 ++ .../profiles/light-level-ColorTemperature-1500-9000k.yml | 4 ++++ .../matter-switch/profiles/light-level-button.yml | 2 ++ .../profiles/light-level-colorTemperature-2200K-6500K.yml | 4 ++++ .../profiles/light-level-colorTemperature-2700K-6500K.yml | 4 ++++ .../profiles/light-level-colorTemperature-2710k-6500k.yml | 4 ++++ .../matter-switch/profiles/light-level-colorTemperature.yml | 4 ++++ .../profiles/light-level-energy-powerConsumption.yml | 2 ++ .../matter-switch/profiles/light-level-motion.yml | 2 ++ .../profiles/light-level-power-energy-powerConsumption.yml | 2 ++ .../matter-switch/profiles/light-level-power.yml | 2 ++ drivers/SmartThings/matter-switch/profiles/light-level.yml | 2 ++ .../profiles/plug-level-energy-powerConsumption.yml | 2 ++ .../profiles/plug-level-power-energy-powerConsumption.yml | 2 ++ .../SmartThings/matter-switch/profiles/plug-level-power.yml | 2 ++ drivers/SmartThings/matter-switch/profiles/plug-level.yml | 2 ++ .../matter-switch/profiles/switch-color-level.yml | 4 ++++ .../profiles/switch-level-colorTemperature.yml | 4 ++++ drivers/SmartThings/matter-switch/profiles/switch-level.yml | 2 ++ 34 files changed, 96 insertions(+), 6 deletions(-) diff --git a/drivers/SmartThings/matter-switch/profiles/ikea-scroll.yml b/drivers/SmartThings/matter-switch/profiles/ikea-scroll.yml index cce4b68d2d..4dc77d026d 100644 --- a/drivers/SmartThings/matter-switch/profiles/ikea-scroll.yml +++ b/drivers/SmartThings/matter-switch/profiles/ikea-scroll.yml @@ -5,8 +5,6 @@ components: capabilities: - id: button version: 1 - - id: knob - version: 1 - id: battery version: 1 - id: firmwareUpdate @@ -20,8 +18,6 @@ components: capabilities: - id: button version: 1 - - id: knob - version: 1 categories: - name: RemoteController - id: group3 @@ -29,7 +25,5 @@ components: capabilities: - id: button version: 1 - - id: knob - version: 1 categories: - name: RemoteController diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level-1800K-6500K.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level-1800K-6500K.yml index 58c8e0fca6..d46df21c5c 100755 --- a/drivers/SmartThings/matter-switch/profiles/light-color-level-1800K-6500K.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-color-level-1800K-6500K.yml @@ -7,12 +7,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level-2000K-7000K.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level-2000K-7000K.yml index 4772e22f66..557fc6120a 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-color-level-2000K-7000K.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-color-level-2000K-7000K.yml @@ -7,12 +7,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level-2200K-6500K.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level-2200K-6500K.yml index 4977423135..92caf967a1 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-color-level-2200K-6500K.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-color-level-2200K-6500K.yml @@ -7,12 +7,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level-2700K-6500K.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level-2700K-6500K.yml index dbef511bbb..cfc20776be 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-color-level-2700K-6500K.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-color-level-2700K-6500K.yml @@ -7,12 +7,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level-fan.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level-fan.yml index 2fabc23bd7..e50af5addd 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-color-level-fan.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-color-level-fan.yml @@ -6,12 +6,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level-illuminance-motion-1000K-15000K.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level-illuminance-motion-1000K-15000K.yml index dd48e4e81a..87206f7c25 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-color-level-illuminance-motion-1000K-15000K.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-color-level-illuminance-motion-1000K-15000K.yml @@ -7,8 +7,12 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level-illuminance-motion.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level-illuminance-motion.yml index 999e64a047..821e866b4e 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-color-level-illuminance-motion.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-color-level-illuminance-motion.yml @@ -6,8 +6,12 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level.yml index 572686ffdd..94d4176446 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-color-level.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-color-level.yml @@ -6,12 +6,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-2-button.yml b/drivers/SmartThings/matter-switch/profiles/light-level-2-button.yml index 7c8b60ef56..7726032e2a 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-2-button.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-2-button.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-3-button.yml b/drivers/SmartThings/matter-switch/profiles/light-level-3-button.yml index 59600efd72..03fbd89c58 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-3-button.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-3-button.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-4-button.yml b/drivers/SmartThings/matter-switch/profiles/light-level-4-button.yml index b49b7f2254..6156f9caa2 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-4-button.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-4-button.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-5-button.yml b/drivers/SmartThings/matter-switch/profiles/light-level-5-button.yml index ee55a6a394..1b07b8c23c 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-5-button.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-5-button.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-6-button.yml b/drivers/SmartThings/matter-switch/profiles/light-level-6-button.yml index 805c97763e..a745fda2b8 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-6-button.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-6-button.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-7-button.yml b/drivers/SmartThings/matter-switch/profiles/light-level-7-button.yml index 5cd1666a5f..0e9e620c3e 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-7-button.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-7-button.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-8-button.yml b/drivers/SmartThings/matter-switch/profiles/light-level-8-button.yml index 4636359e92..aa62c77ba6 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-8-button.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-8-button.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-ColorTemperature-1500-9000k.yml b/drivers/SmartThings/matter-switch/profiles/light-level-ColorTemperature-1500-9000k.yml index f19e55ec9c..8760877585 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-ColorTemperature-1500-9000k.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-ColorTemperature-1500-9000k.yml @@ -7,12 +7,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-button.yml b/drivers/SmartThings/matter-switch/profiles/light-level-button.yml index 9fc53f642b..6c215a946d 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-button.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-button.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2200K-6500K.yml b/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2200K-6500K.yml index 79d6556485..56414b519f 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2200K-6500K.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2200K-6500K.yml @@ -7,12 +7,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2700K-6500K.yml b/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2700K-6500K.yml index 75b2bd488c..f4601c8148 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2700K-6500K.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2700K-6500K.yml @@ -7,12 +7,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2710k-6500k.yml b/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2710k-6500k.yml index b49179036f..9223bfa042 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2710k-6500k.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature-2710k-6500k.yml @@ -7,12 +7,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature.yml b/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature.yml index 4d130281d7..571033c33b 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-colorTemperature.yml @@ -6,12 +6,16 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" range: [1, 100] - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-energy-powerConsumption.yml b/drivers/SmartThings/matter-switch/profiles/light-level-energy-powerConsumption.yml index 03963ccbd2..0eb608818f 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-energy-powerConsumption.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-energy-powerConsumption.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-motion.yml b/drivers/SmartThings/matter-switch/profiles/light-level-motion.yml index bdea457c21..222efe927f 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-motion.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-motion.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-power-energy-powerConsumption.yml b/drivers/SmartThings/matter-switch/profiles/light-level-power-energy-powerConsumption.yml index f6c45ed1f7..83398b009c 100755 --- a/drivers/SmartThings/matter-switch/profiles/light-level-power-energy-powerConsumption.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-power-energy-powerConsumption.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level-power.yml b/drivers/SmartThings/matter-switch/profiles/light-level-power.yml index 23625ada16..e6701c5030 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level-power.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level-power.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/light-level.yml b/drivers/SmartThings/matter-switch/profiles/light-level.yml index e266f497c9..e63693813b 100644 --- a/drivers/SmartThings/matter-switch/profiles/light-level.yml +++ b/drivers/SmartThings/matter-switch/profiles/light-level.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 config: values: - key: "level.value" diff --git a/drivers/SmartThings/matter-switch/profiles/plug-level-energy-powerConsumption.yml b/drivers/SmartThings/matter-switch/profiles/plug-level-energy-powerConsumption.yml index 86bd861bce..4ae29d2320 100644 --- a/drivers/SmartThings/matter-switch/profiles/plug-level-energy-powerConsumption.yml +++ b/drivers/SmartThings/matter-switch/profiles/plug-level-energy-powerConsumption.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 - id: energyMeter version: 1 - id: powerConsumptionReport diff --git a/drivers/SmartThings/matter-switch/profiles/plug-level-power-energy-powerConsumption.yml b/drivers/SmartThings/matter-switch/profiles/plug-level-power-energy-powerConsumption.yml index 17e7d6b7a0..477fb8b769 100644 --- a/drivers/SmartThings/matter-switch/profiles/plug-level-power-energy-powerConsumption.yml +++ b/drivers/SmartThings/matter-switch/profiles/plug-level-power-energy-powerConsumption.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 - id: powerMeter version: 1 - id: energyMeter diff --git a/drivers/SmartThings/matter-switch/profiles/plug-level-power.yml b/drivers/SmartThings/matter-switch/profiles/plug-level-power.yml index d175930a92..8bb1c56361 100644 --- a/drivers/SmartThings/matter-switch/profiles/plug-level-power.yml +++ b/drivers/SmartThings/matter-switch/profiles/plug-level-power.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 - id: powerMeter version: 1 - id: firmwareUpdate diff --git a/drivers/SmartThings/matter-switch/profiles/plug-level.yml b/drivers/SmartThings/matter-switch/profiles/plug-level.yml index 0d888b843f..90fa2ece47 100644 --- a/drivers/SmartThings/matter-switch/profiles/plug-level.yml +++ b/drivers/SmartThings/matter-switch/profiles/plug-level.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 - id: firmwareUpdate version: 1 - id: refresh diff --git a/drivers/SmartThings/matter-switch/profiles/switch-color-level.yml b/drivers/SmartThings/matter-switch/profiles/switch-color-level.yml index f1f9e78438..e5754e8ad6 100644 --- a/drivers/SmartThings/matter-switch/profiles/switch-color-level.yml +++ b/drivers/SmartThings/matter-switch/profiles/switch-color-level.yml @@ -6,8 +6,12 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/switch-level-colorTemperature.yml b/drivers/SmartThings/matter-switch/profiles/switch-level-colorTemperature.yml index 42e3ef6257..b5f844ccf7 100644 --- a/drivers/SmartThings/matter-switch/profiles/switch-level-colorTemperature.yml +++ b/drivers/SmartThings/matter-switch/profiles/switch-level-colorTemperature.yml @@ -6,8 +6,12 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 - id: colorTemperature version: 1 + - id: statelessColorTemperatureStep + version: 1 config: values: - key: "colorTemperature.value" diff --git a/drivers/SmartThings/matter-switch/profiles/switch-level.yml b/drivers/SmartThings/matter-switch/profiles/switch-level.yml index 8f3b9f5e5c..827fcdd898 100644 --- a/drivers/SmartThings/matter-switch/profiles/switch-level.yml +++ b/drivers/SmartThings/matter-switch/profiles/switch-level.yml @@ -6,6 +6,8 @@ components: version: 1 - id: switchLevel version: 1 + - id: statelessSwitchLevelStep + version: 1 - id: firmwareUpdate version: 1 - id: refresh From 65d4001e893711e4eb03c435def2905e5197adba Mon Sep 17 00:00:00 2001 From: Harrison Carter Date: Tue, 16 Dec 2025 20:07:58 -0600 Subject: [PATCH 4/7] remove test profile --- .../profiles/light-color-level-ikea.yml | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 drivers/SmartThings/matter-switch/profiles/light-color-level-ikea.yml diff --git a/drivers/SmartThings/matter-switch/profiles/light-color-level-ikea.yml b/drivers/SmartThings/matter-switch/profiles/light-color-level-ikea.yml deleted file mode 100644 index b562491638..0000000000 --- a/drivers/SmartThings/matter-switch/profiles/light-color-level-ikea.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: light-color-level-ikea -components: -- id: main - capabilities: - - id: switch - version: 1 - - id: switchLevel - version: 1 - config: - values: - - key: "level.value" - range: [1, 100] - - id: statelessSwitchLevelStep - version: 1 - - id: colorTemperature - version: 1 - config: - values: - - key: "colorTemperature.value" - range: [ 2200, 6500 ] - - id: statelessColorTemperatureStep - version: 1 - - id: colorControl - version: 1 - - id: firmwareUpdate - version: 1 - - id: refresh - version: 1 - categories: - - name: Light From dd29afdf1ca0247758e5c9c606a319485713acbe Mon Sep 17 00:00:00 2001 From: Harrison Carter Date: Tue, 16 Dec 2025 20:09:10 -0600 Subject: [PATCH 5/7] remove extra line --- .../sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua index 4b80bcbb61..a8a7e9db89 100644 --- a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua +++ b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua @@ -25,8 +25,6 @@ function IkeaScrollEventHandlers.initial_press_handler(driver, device, ib, respo device:set_field(scroll_fields.LATEST_NUMBER_OF_PRESSES_COUNTED, 1) rotate_amount_event_helper(device, ib.endpoint_id, 1) end - - generic_event_handlers.initial_press_handler(driver, device. ib, response) end -- Used by ENDPOINTS_UP_SCROLL and ENDPOINTS_DOWN_SCROLL, not ENDPOINTS_PUSH From 6cd4fe3414b841fed3b607581614667125cd12a3 Mon Sep 17 00:00:00 2001 From: Harrison Carter Date: Tue, 16 Dec 2025 20:13:14 -0600 Subject: [PATCH 6/7] fix things --- .../sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua index a8a7e9db89..dd1ba82dad 100644 --- a/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua +++ b/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua @@ -16,7 +16,6 @@ local function rotate_amount_event_helper(device, endpoint_id, num_presses_to_ha device:emit_event_for_endpoint(endpoint_id, capabilities.knob.rotateAmount(scroll_amount, {state_change = true})) end --- Used by ENDPOINTS_UP_SCROLL and ENDPOINTS_DOWN_SCROLL, not ENDPOINTS_PUSH function IkeaScrollEventHandlers.initial_press_handler(driver, device, ib, response) -- use the generic handler logic for the push endpoints. Else, use custom logic. if switch_utils.tbl_contains(ib.endpoint_id, scroll_fields.ENDPOINTS_PUSH) then From 9d4d19a6f9edbabd5108588f93ff87b7338abaef Mon Sep 17 00:00:00 2001 From: Harrison Carter Date: Tue, 16 Dec 2025 21:29:57 -0600 Subject: [PATCH 7/7] remove early return for testing --- .../matter-switch/src/switch_utils/device_configuration.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua b/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua index 750c9eb50c..0e5b0ffadb 100644 --- a/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua +++ b/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua @@ -201,7 +201,8 @@ function DeviceConfiguration.match_profile(driver, device) elseif generic_profile("light-level-colorTemperature") or generic_profile("light-color-level") then -- ignore attempts to dynamically profile light-level-colorTemperature and light-color-level devices for now, since -- these may lose fingerprinted Kelvin ranges when dynamically profiled. - return + + -- for testing, remove return end end