Skip to content

Commit

Permalink
Merge pull request #1745 from SmartThingsCommunity/bugfix/CHAD-14232
Browse files Browse the repository at this point in the history
CHAD-14232 clear codeState values in storage on driver restart
  • Loading branch information
greens authored Nov 13, 2024
2 parents 58877c2 + 4d97ece commit 307fe1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/SmartThings/zigbee-lock/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ end

local function init(driver, device)
lock_utils.populate_state_from_data(device)
-- temp fix before this can be changed to non-persistent
device:set_field(lock_utils.CODE_STATE, nil, { persist = true })
end

-- The following two functions are from the lock defaults. They are in the base driver temporarily
Expand Down
2 changes: 2 additions & 0 deletions drivers/SmartThings/zwave-lock/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ end

local init_handler = function(driver, device, event)
populate_state_from_data(device)
-- temp fix before this can be changed from being persisted in memory
device:set_field(constants.CODE_STATE, nil, { persist = true })
end

local do_refresh = function(self, device)
Expand Down

0 comments on commit 307fe1c

Please sign in to comment.