Skip to content

Commit 34dff1d

Browse files
committed
Fix hager driver delay
1 parent f46b647 commit 34dff1d

2 files changed

Lines changed: 326 additions & 36 deletions

File tree

‎drivers/SmartThings/matter-switch/src/sub_drivers/hager/init.lua‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ local function info_changed(driver, device, event, args)
189189
end
190190

191191
if device.profile.id ~= args.old_st_store.profile.id or device.network_type == device_lib.NETWORK_TYPE_CHILD then
192-
local parent = device:get_parent_device()
193-
local matter_device = get_matter_device(parent)
194-
local map = {}
195192
device.thread:call_with_delay(2, function()
193+
local parent = device:get_parent_device()
194+
local matter_device = get_matter_device(parent)
195+
local map = {}
196196
if device:supports_capability(capabilities.button) then
197197
local button_eps = parent:get_field(BUTTON_EPS)
198198
local clean_eps = {}

0 commit comments

Comments
 (0)