Skip to content

Commit

Permalink
Adding exception case of manufacturer information for IKEA button
Browse files Browse the repository at this point in the history
  • Loading branch information
jaemin11lee committed Feb 23, 2024
1 parent c19d0e3 commit 38244ef
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
5 changes: 5 additions & 0 deletions drivers/SmartThings/zigbee-button/fingerprints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ zigbeeManufacturer:
manufacturer: KE
model: TRADFRI open/close remote
deviceProfileName: two-buttons-battery
- id: "02KE/TRADFRIopenclose"
deviceLabel: IKEA Remote Control
manufacturer: "\x02KE"
model: TRADFRI open/close remote
deviceProfileName: two-buttons-battery
- id: "CentraLite/3450-L"
deviceLabel: Iris Remote Control
manufacturer: CentraLite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ local Groups = clusters.Groups

local ENTRIES_READ = "ENTRIES_READ"

local IKEA_MFG = {
{ mfr = "IKEA of Sweden" },
{ mfr = "KE" },
{ mfr = "\02KE" }
}

local can_handle_ikea = function(opts, driver, device)
for _, fingerprint in ipairs(IKEA_MFG) do
if device:get_manufacturer() == fingerprint.mfr then
return true
end
end
return false
end

local do_configure = function(self, device)
device:send(device_management.build_bind_request(device, PowerConfiguration.ID, self.environment_info.hub_zigbee_eui))
device:send(device_management.build_bind_request(device, OnOff.ID, self.environment_info.hub_zigbee_eui))
Expand Down Expand Up @@ -129,9 +144,7 @@ local ikea_of_sweden = {
require("zigbee-multi-button.ikea.TRADFRI_on_off_switch"),
require("zigbee-multi-button.ikea.TRADFRI_open_close_remote")
},
can_handle = function(opts, driver, device, ...)
return device:get_manufacturer() == "IKEA of Sweden" or device:get_manufacturer() == "KE"
end
can_handle = can_handle_ikea
}

return ikea_of_sweden
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ local ZIGBEE_MULTI_BUTTON_FINGERPRINTS = {
{ mfr = "IKEA of Sweden", model = "TRADFRI open/close remote" },
{ mfr = "IKEA of Sweden", model = "TRADFRI remote control" },
{ mfr = "KE", model = "TRADFRI open/close remote" },
{ mfr = "\x02KE", model = "TRADFRI open/close remote" },
{ mfr = "SOMFY", model = "Situo 1 Zigbee" },
{ mfr = "SOMFY", model = "Situo 4 Zigbee" },
{ mfr = "LDS", model = "ZBT-CCTSwitch-D0001" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ local devices = {
BUTTON_PUSH_2 = {
MATCHING_MATRIX = {
{ mfr = "IKEA of Sweden", model = "TRADFRI open/close remote" },
{ mfr = "KE", model = "TRADFRI open/close remote" }
{ mfr = "KE", model = "TRADFRI open/close remote" },
{ mfr = "\x02KE", model = "TRADFRI open/close remote" }
},
SUPPORTED_BUTTON_VALUES = { "pushed" },
NUMBER_OF_BUTTONS = 2
Expand Down

0 comments on commit 38244ef

Please sign in to comment.