Skip to content

Commit

Permalink
Merge pull request #1509 from SmartThingsCommunity/bugfix/matter-sens…
Browse files Browse the repository at this point in the history
…or-profile-switch-subscribe

Matter Sensor: resubscribe on profile switch
  • Loading branch information
ctowns authored Jul 12, 2024
2 parents 84ff5be + 8459605 commit 6583fe8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/SmartThings/matter-sensor/src/smoke-co-alarm/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ local function info_changed(self, device, event, args)
end
end
end

-- resubscribe to new attributes as needed if a profile switch occured
if device.profile.id ~= args.old_st_store.profile.id then
device:subscribe()
end
end

-- Matter Handlers --
Expand Down

0 comments on commit 6583fe8

Please sign in to comment.