nayelyz
(SmartThings Developer Support)
February 18, 2022, 4:54pm
2
I’ve seen others have managed to make “hybrid” drivers. For example:
So you’re saying that if it doesn’t match these 3 parameters, then the device is not created. Is that right?
I will recheck mine. Thanks.
local metadata = {
type = "LAN",
profile = "child-smart-plug.v1",
manufacturer = device:get_manufacturer(),
model = device:get_model(),
vendor_provided_label = "Child Smart Plug",
device_network_id = device.device_network_id .. ":0" .. index,
parent_device_id = device.id,
label = "Child Smart Plug " .. index,
}
index comes from a for-loop.
Due to the LAN limitation, I tried 2 approaches, both being called at init lifecycle handler of the zigbee device:
zbDriver:try_create_device(metadata)
lanDriver:try_create_device(metadata)
I think doesn’t matter zbDriver or lanDriver as both will end up at the same implementation mentioned in t…
It could be possible but not simple, and as we’re still in the beta phase, this kind of scenario could have some issues.
It also depends on what you’re trying to achieve because there could be other simpler options.
1 Like