diff --git a/drivers/SmartThings/philips-hue/src/utils/hue_bridge_utils.lua b/drivers/SmartThings/philips-hue/src/utils/hue_bridge_utils.lua index a1e7779bdd..ea67abea13 100644 --- a/drivers/SmartThings/philips-hue/src/utils/hue_bridge_utils.lua +++ b/drivers/SmartThings/philips-hue/src/utils/hue_bridge_utils.lua @@ -237,7 +237,7 @@ function hue_bridge_utils.do_bridge_network_init(driver, bridge_device, bridge_u end bridge_device:set_field(Fields._INIT, true, { persist = false }) local ids_to_remove = {} - for id, device in ipairs(driver._devices_pending_refresh) do + for id, device in pairs(driver._devices_pending_refresh) do local parent_bridge = utils.get_hue_bridge_for_device(driver, device) local bridge_id = parent_bridge and parent_bridge.id if bridge_id == bridge_device.id then