Skip to content

Commit e4cc7a4

Browse files
committed
fix: Fix wrong iterator usage
Using `ipairs` here instead of `pairs` meant that any devices that ended up in this queue were never actually being refreshed. Fixes #1674
1 parent 52127f7 commit e4cc7a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/SmartThings/philips-hue/src/utils/hue_bridge_utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function hue_bridge_utils.do_bridge_network_init(driver, bridge_device, bridge_u
237237
end
238238
bridge_device:set_field(Fields._INIT, true, { persist = false })
239239
local ids_to_remove = {}
240-
for id, device in ipairs(driver._devices_pending_refresh) do
240+
for id, device in pairs(driver._devices_pending_refresh) do
241241
local parent_bridge = utils.get_hue_bridge_for_device(driver, device)
242242
local bridge_id = parent_bridge and parent_bridge.id
243243
if bridge_id == bridge_device.id then

0 commit comments

Comments
 (0)