Skip to content

Commit 199f355

Browse files
committed
change detect_matter_thing simplification to run on FW58
1 parent 8c62fe3 commit 199f355

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/SmartThings/matter-switch/src/utils/switch_utils.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ end
195195

196196
function utils.detect_matter_thing(device)
197197
-- every profile except for matter-thing supports at least 2 capabilities (refresh, firmwareUpdate)
198-
return #device.profile.components.main.capabilities == 1
198+
for i, _ in pairs(device.profile.components.main.capabilities) do
199+
if i > 1 then return false end
200+
end
201+
return true
199202
end
200203

201204
function utils.report_power_consumption_to_st_energy(device, latest_total_imported_energy_wh)

0 commit comments

Comments
 (0)