Skip to content

Commit 585b85e

Browse files
committed
remove gating in init for info handling
1 parent 191d97d commit 585b85e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • drivers/SmartThings/matter-switch/src

drivers/SmartThings/matter-switch/src/init.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ function SwitchLifecycleHandlers.device_init(driver, device)
101101
if #device:get_endpoints(clusters.PowerSource.ID, {feature_bitmap = clusters.PowerSource.types.PowerSourceFeature.BATTERY}) == 0 then
102102
device:set_field(fields.profiling_data.BATTERY_SUPPORT, fields.battery_support.NO_BATTERY, {persist = true})
103103
end
104-
if device:get_field(fields.profiling_data.POWER_TOPOLOGY) == nil then
105-
switch_utils.handle_electrical_sensor_info(device)
106-
end
104+
switch_utils.handle_electrical_sensor_info(device)
107105
device:extend_device("subscribe", switch_utils.subscribe)
108106
device:subscribe()
109107
end

0 commit comments

Comments
 (0)