[ST Edge] Issue with updating capability_handlers


I created a device with only refresh and switch capability, and later added additional capabilities (e.g. fanSpeed and switchLevel), the additional handlers for fanSpeed and switchLevel` will not be called, unless I re-create the device again.

Is this the expected behavior?

local driver =
            discovery = discovery.handle_discovery,
            lifecycle_handlers = lifecycles
            lan_info_changed_handler = lan_info_changed_handler,
            capability_handlers = {
                [capabilities.refresh.ID] = {
                    [capabilities.refresh.commands.refresh.NAME] = commands.refresh
                [capabilities.switch.ID] = {
                    [capabilities.switch.commands.on.NAME] = commands.handle_switch,
                    [capabilities.switch.commands.off.NAME] = commands.handle_switch
                -- Added this later
                [capabilities.fanSpeed.ID] = {
                    [capabilities.fanSpeed.commands.setFanSpeed.NAME] = commands.handle_fanSpeed
                [capabilities.switchLevel.ID] = {
                    [capabilities.switchLevel.commands.setLevel.NAME] = commands.handle_switchLevel

Hi, @hongtat.
When you add the new capabilities, they appear in the mobile app but the handlers are not called or they don’t appear either?

Hi @nayelyz

The new capabilities appear in the mobile app but the handlers are not called.

I sent you a private message to collect some information, please check it and let me know if you have any questions.