Skip to content

Commit c6c6f67

Browse files
addressing review feedback
1 parent 7f067b7 commit c6c6f67

File tree

1 file changed

+3
-5
lines changed
  • drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils

1 file changed

+3
-5
lines changed

drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,17 @@ function CameraUtils.optional_capabilities_list_changed(new_component_capability
144144

145145
number_of_components_counted = number_of_components_counted + 1
146146

147-
if not previous_capability_map[component_name] then
147+
if previous_capability_map[component_name] == nil then
148148
return true
149149
end
150150

151-
local capabilities_in_component = 0
152151
for _, capability in ipairs(capability_list) do
153-
if not previous_capability_map[component_name][capability] then
152+
if previous_capability_map[component_name][capability] == nil then
154153
return true
155154
end
156-
capabilities_in_component = capabilities_in_component + 1
157155
end
158156

159-
if capabilities_in_component ~= component_sizes[component_name] then
157+
if #capability_list ~= component_sizes[component_name] then
160158
return true
161159
end
162160
end

0 commit comments

Comments
 (0)