Skip to content

Commit 08c1616

Browse files
committed
Fixed detecting type of current sensors and removed support of production current sensors
1 parent 32c1b58 commit 08c1616

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/SmartThings/abb-scu200/src/discovery.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ local function try_add_thing(driver, parent_device, thing_dni, thing_info)
101101
if thing_info.type == utils.get_thing_exact_type(config.EDGE_CHILD_WATER_METER_TYPE) or thing_info.type == utils.get_thing_exact_type(config.EDGE_CHILD_GAS_METER_TYPE) then
102102
log.warn("try_add_thing(): Not supported thing type: " .. thing_info.type)
103103
return false
104+
elseif thing_info.type == utils.get_thing_exact_type(config.EDGE_CHILD_CURRENT_SENSOR_TYPE) and thing_info.properties.isExport then
105+
log.warn("try_add_thing(): Current sensor with production data is not supported")
106+
return false
104107
end
105108

106109
local profile_ref = utils.get_thing_profile_ref(thing_info)

drivers/SmartThings/abb-scu200/src/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ end
8181
-- Method for getting the thing profile reference
8282
function utils.get_thing_profile_ref(thing_info)
8383
if thing_info.type == utils.get_thing_exact_type(config.EDGE_CHILD_CURRENT_SENSOR_TYPE) then
84-
if thing_info.isExport then
84+
if thing_info.properties.isExport then
8585
return config.EDGE_CHILD_CURRENT_SENSOR_PRODUCTION_PROFILE
8686
else
8787
return config.EDGE_CHILD_CURRENT_SENSOR_CONSUMPTION_PROFILE

0 commit comments

Comments
 (0)