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
4 changes: 4 additions & 0 deletions drivers/SmartThings/zigbee-lock/profiles/base-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ components:
version: 1
- id: lockCodes
version: 1
- id: lockCredentials
version: 1
- id: lockUsers
version: 1
- id: battery
version: 1
- id: firmwareUpdate
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Copyright 2026 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

return function(opts, driver, device)
local fingerprints = require("bad-battery-reporter.fingerprints")
for _, fingerprint in ipairs(fingerprints) do
if device:get_manufacturer() == fingerprint.mfr and device:get_model() == fingerprint.model then
local subdriver = require("bad-battery-reporter")
return true, subdriver
end
end
return false
end
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Copyright 2025 SmartThings, Inc.
-- Licensed under the Apache License, Version 2.0

local BAD_YALE_LOCK_FINGERPRINTS = {
local BAD_BATTERY_REPORTING_LOCK_FINGERPRINTS = {
{ mfr = "Yale", model = "YRD220/240 TSDB" },
{ mfr = "Yale", model = "YRL220 TS LL" },
{ mfr = "Yale", model = "YRD210 PB DB" },
Expand All @@ -10,4 +10,4 @@ local BAD_YALE_LOCK_FINGERPRINTS = {
{ mfr = "ASSA ABLOY iRevo", model = "06ffff2027" }
}

return BAD_YALE_LOCK_FINGERPRINTS
return BAD_BATTERY_REPORTING_LOCK_FINGERPRINTS
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ local battery_report_handler = function(driver, device, value)
device:emit_event(capabilities.battery.battery(value.value))
end

local bad_yale_driver = {
NAME = "YALE BAD Lock Driver",
local bad_battery_reporter_driver = {
NAME = "Bad Battery Reporter Driver",
zigbee_handlers = {
attr = {
[clusters.PowerConfiguration.ID] = {
[clusters.PowerConfiguration.attributes.BatteryPercentageRemaining.ID] = battery_report_handler
}
}
},
can_handle = require("yale.yale-bad-battery-reporter.can_handle"),
can_handle = require("bad-battery-reporter.can_handle")
}

return bad_yale_driver
return bad_battery_reporter_driver
712 changes: 460 additions & 252 deletions drivers/SmartThings/zigbee-lock/src/init.lua

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions drivers/SmartThings/zigbee-lock/src/legacy-handlers/can_handle.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Copyright 2026 SmartThings
-- Licensed under the Apache License, Version 2.0

return function(opts, driver, device, ...)
local capabilities = require "st.capabilities"
local lock_codes_migrated = device:get_latest_state("main", capabilities.lockCodes.ID,
capabilities.lockCodes.migrated.NAME, false)
if not lock_codes_migrated then
local subdriver = require("legacy-handlers")
return true, subdriver
end
return false
end
Loading
Loading