Skip to content
Open
Show file tree
Hide file tree
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 @@ -10,9 +10,14 @@ return function(opts, driver, device)
-- this sub driver loads for devices that:
-- 1. Contain the Eve Private Cluster (0x130AFC01)
-- 2. Do NOT have the Standard Electrical Sensor device type
-- 3. Match one of the known Eve Energy vendor/product ID combinations
-- We should still check that the device does not have the Electrical Sensor
-- device type because this sub driver is only needed for cases where devices
-- may be on old FW and do not support the standard Electical Sensor related clusters.
if device.network_type == device_lib.NETWORK_TYPE_MATTER and
#device:get_endpoints(EVE_PRIVATE_CLUSTER_ID) > 0 and
#switch_utils.get_endpoints_by_device_type(device, fields.DEVICE_TYPE_ID.ELECTRICAL_SENSOR) == 0 then
#switch_utils.get_endpoints_by_device_type(device, fields.DEVICE_TYPE_ID.ELECTRICAL_SENSOR) == 0 and
switch_utils.get_product_override_field(device, "needs_eve_energy_subdriver") then
return true, require("sub_drivers.eve_energy")
end
return false
Expand Down
9 changes: 9 additions & 0 deletions drivers/SmartThings/matter-switch/src/switch_utils/fields.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ SwitchFields.vendor_overrides = {
[0x0007] = { needs_hager_subdriver = true }, -- Hager HBnet PIR 1.1M
[0x000A] = { needs_hager_subdriver = true }, -- Hager HBnet PIR 2.2M
},
[0x130A] = { -- EVE_MANUFACTURER_ID
[0x0050] = { needs_eve_energy_subdriver = true }, -- Eve Energy EU
[0x0053] = { needs_eve_energy_subdriver = true }, -- Eve Energy US
[0x0054] = { needs_eve_energy_subdriver = true }, -- Eve Energy UK
[0x005E] = { needs_eve_energy_subdriver = true }, -- Eve Energy AU
[0x0069] = { needs_eve_energy_subdriver = true }, -- Eve Energy Outlet US
[0x006A] = { needs_eve_energy_subdriver = true }, -- Eve Energy CH
[0x006B] = { needs_eve_energy_subdriver = true }, -- Eve Energy Outlet EU
},
[0x1321] = { -- SONOFF_MANUFACTURER_ID
[0x000C] = { target_profile = "switch-binary", initial_profile = "plug-binary" },
[0x000D] = { target_profile = "switch-binary", initial_profile = "plug-binary" },
Expand Down
Loading