Skip to content
Merged
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 @@ -321,6 +321,10 @@ function AttributeHandlers.available_endpoints_handler(driver, device, ib, respo
return
end
local set_topology_eps = device:get_field(fields.ELECTRICAL_SENSOR_EPS)
if set_topology_eps == nil then
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
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 @@ -350,6 +354,10 @@ function AttributeHandlers.parts_list_handler(driver, device, ib, response)
return
end
local tree_topology_eps = device:get_field(fields.ELECTRICAL_SENSOR_EPS)
if tree_topology_eps == nil then
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
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
Loading