Skip to content

Commit cbaa7b4

Browse files
Don't run match_profile for child devices
1 parent d5563eb commit cbaa7b4

File tree

1 file changed

+6
-2
lines changed
  • drivers/SmartThings/matter-switch/src

1 file changed

+6
-2
lines changed

drivers/SmartThings/matter-switch/src/init.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,11 +765,15 @@ local function match_profile(driver, device)
765765
end
766766

767767
local function do_configure(driver, device)
768-
match_profile(driver, device)
768+
if device.network_type == device_lib.NETWORK_TYPE_MATTER then
769+
match_profile(driver, device)
770+
end
769771
end
770772

771773
local function driver_switched(driver, device)
772-
match_profile(driver, device)
774+
if device.network_type == device_lib.NETWORK_TYPE_MATTER then
775+
match_profile(driver, device)
776+
end
773777
end
774778

775779
local function device_removed(driver, device)

0 commit comments

Comments
 (0)