Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ function AttributeHandlers.available_endpoints_handler(driver, device, ib, respo
device.log.warn("Received an AvailableEndpoints response but no Electrical Sensor endpoints have been identified as supporting the Power Topology cluster with SET feature. Ignoring this response.")
return
end

device.log.debug_with({hub_logs=true}, string.format("Handling AvailableEndpoints response for endpoint %d with elements: %s", ib.endpoint_id, st_utils.stringify_table(ib.data.elements or {})))
for i, set_ep_info in pairs(set_topology_eps or {}) do
if ib.endpoint_id == set_ep_info.endpoint_id then
-- since EP response is being handled here, remove it from the ELECTRICAL_SENSOR_EPS table
Expand Down Expand Up @@ -366,6 +368,8 @@ function AttributeHandlers.parts_list_handler(driver, device, ib, response)
device.log.warn("Received a PartsList response but no Electrical Sensor endpoints have been identified as supporting the Power Topology cluster with TREE feature. Ignoring this response.")
return
end

device.log.debug_with({hub_logs=true}, string.format("Handling PartsList response for endpoint %d with elements: %s", ib.endpoint_id, st_utils.stringify_table(ib.data.elements or {})))
for i, tree_ep_info in pairs(tree_topology_eps or {}) do
if ib.endpoint_id == tree_ep_info.endpoint_id then
-- since EP response is being handled here, remove it from the ELECTRICAL_SENSOR_EPS table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function ChildConfiguration.create_or_update_child_devices(driver, device, serve
local child_profile, optional_component_capabilities = assign_profile_fn(device, ep_id, true)
local existing_child_device = device:get_field(fields.IS_PARENT_CHILD_DEVICE) and switch_utils.find_child(device, ep_id)
if not existing_child_device then
device.log.info_with({hub_logs=true}, string.format("Creating child device for endpoint %d with profile %s", ep_id, child_profile))
driver:try_create_device({
type = "EDGE_CHILD",
label = label_and_name,
Expand Down
Loading