Skip to content

Commit 3d2d422

Browse files
Restore Aqara and Eve subdriver changes
Moving these changes into a new PR along with other changes to the subdrivers so that they can be reviewed separately.
1 parent d122771 commit 3d2d422

File tree

2 files changed

+5
-36
lines changed

2 files changed

+5
-36
lines changed

drivers/SmartThings/matter-switch/src/aqara-cube/init.lua

+4-27
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
-- Copyright 2025 SmartThings
2-
--
3-
-- Licensed under the Apache License, Version 2.0 (the "License");
4-
-- you may not use this file except in compliance with the License.
5-
-- You may obtain a copy of the License at
6-
--
7-
-- http://www.apache.org/licenses/LICENSE-2.0
8-
--
9-
-- Unless required by applicable law or agreed to in writing, software
10-
-- distributed under the License is distributed on an "AS IS" BASIS,
11-
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
-- See the License for the specific language governing permissions and
13-
-- limitations under the License.
14-
151
local capabilities = require "st.capabilities"
162
local clusters = require "st.matter.clusters"
173
local device_lib = require "st.device"
@@ -33,11 +19,10 @@ local CUBEACTION_TIMER = "__cubeAction_timer"
3319
local CUBEACTION_TIME = 3
3420

3521
local function is_aqara_cube(opts, driver, device)
36-
if device.network_type == device_lib.NETWORK_TYPE_MATTER then
37-
local name = string.format("%s", device.manufacturer_info.product_name)
38-
if string.find(name, "Aqara Cube T1 Pro") then
22+
local name = string.format("%s", device.manufacturer_info.product_name)
23+
if device.network_type == device_lib.NETWORK_TYPE_MATTER and
24+
string.find(name, "Aqara Cube T1 Pro") then
3925
return true
40-
end
4126
end
4227
return false
4328
end
@@ -201,12 +186,6 @@ local function info_changed(driver, device, event, args)
201186
end
202187
end
203188

204-
-- override do_configure to prevent it running in the main driver
205-
local function do_configure(driver, device) end
206-
207-
-- override driver_switched to prevent it running in the main driver
208-
local function driver_switched(driver, device) end
209-
210189
local function initial_press_event_handler(driver, device, ib, response)
211190
if get_field_for_endpoint(device, INITIAL_PRESS_ONLY, ib.endpoint_id) then
212191
local map = device:get_field(COMPONENT_TO_ENDPOINT_MAP_BUTTON) or {}
@@ -235,9 +214,7 @@ local aqara_cube_handler = {
235214
lifecycle_handlers = {
236215
init = device_init,
237216
added = device_added,
238-
infoChanged = info_changed,
239-
doConfigure = do_configure,
240-
driverSwitched = driver_switched
217+
infoChanged = info_changed
241218
},
242219
matter_handlers = {
243220
attr = {

drivers/SmartThings/matter-switch/src/eve-energy/init.lua

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- Copyright 2025 SmartThings
1+
-- Copyright 2023 SmartThings
22
--
33
-- Licensed under the Apache License, Version 2.0 (the "License");
44
-- you may not use this file except in compliance with the License.
@@ -277,12 +277,6 @@ local function device_removed(driver, device)
277277
delete_poll_schedule(device)
278278
end
279279

280-
-- override do_configure to prevent it running in the main driver
281-
local function do_configure(driver, device) end
282-
283-
-- override driver_switched to prevent it running in the main driver
284-
local function driver_switched(driver, device) end
285-
286280
local function handle_refresh(self, device)
287281
requestData(device)
288282
end
@@ -374,8 +368,6 @@ local eve_energy_handler = {
374368
init = device_init,
375369
added = device_added,
376370
removed = device_removed,
377-
doConfigure = do_configure,
378-
driverSwitched = driver_switched
379371
},
380372
matter_handlers = {
381373
attr = {

0 commit comments

Comments
 (0)