File tree Expand file tree Collapse file tree 3 files changed +20
-26
lines changed
drivers/SmartThings/zigbee-sound-sensor/src Expand file tree Collapse file tree 3 files changed +20
-26
lines changed Original file line number Diff line number Diff line change 1- -- Copyright 2022 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.
1+ -- Copyright 2022 SmartThings, Inc.
2+ -- Licensed under the Apache License, Version 2.0
3+
144
155local device_management = require " st.zigbee.device_management"
166local ZigbeeDriver = require " st.zigbee"
Original file line number Diff line number Diff line change 1+ -- Copyright 2025 SmartThings, Inc.
2+ -- Licensed under the Apache License, Version 2.0
3+
4+ return function (sub_driver_name )
5+ -- gets the current lua libs api version
6+ local version = require " version"
7+ local ZigbeeDriver = require " st.zigbee"
8+ if version .api >= 16 then
9+ return ZigbeeDriver .lazy_load_sub_driver_v2 (sub_driver_name )
10+ elseif version .api >= 9 then
11+ return ZigbeeDriver .lazy_load_sub_driver (require (sub_driver_name ))
12+ else
13+ return require (sub_driver_name )
14+ end
15+ end
Original file line number Diff line number Diff line change 1- -- Copyright 2022 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.
1+ -- Copyright 2022 SmartThings, Inc.
2+ -- Licensed under the Apache License, Version 2.0
143
154-- Mock out globals
165local test = require " integration_test"
You can’t perform that action at this time.
0 commit comments