Skip to content

Commit 02b2f8a

Browse files
Adding log when subdriver is used
1 parent dc3eb0c commit 02b2f8a

File tree

1 file changed

+5
-4
lines changed
  • drivers/SmartThings/matter-switch/src/third-reality-mk1

1 file changed

+5
-4
lines changed

drivers/SmartThings/matter-switch/src/third-reality-mk1/init.lua

+5-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ local capabilities = require "st.capabilities"
1616
local clusters = require "st.matter.clusters"
1717
local device_lib = require "st.device"
1818
local im = require "st.matter.interaction_model"
19+
local log = require "log"
1920

2021
local COMPONENT_TO_ENDPOINT_MAP = "__component_to_endpoint_map"
2122
local INITIAL_PRESS_ONLY = "__initial_press_only"
@@ -24,13 +25,13 @@ local INITIAL_PRESS_ONLY = "__initial_press_only"
2425
-- Third Reality MK1 specifics
2526
-------------------------------------------------------------------------------------
2627

27-
local THIRD_REALITY_MANUFACTURER_ID = 0x1407
28-
local THIRD_REALITY_MK1_PRODUCT_ID = 0x1388
28+
local THIRD_REALITY_MK1_FINGERPRINT = { vendor_id = 0x1407, product_id = 0x1388 }
2929

3030
local function is_third_reality_mk1(opts, driver, device)
3131
if device.network_type == device_lib.NETWORK_TYPE_MATTER and
32-
device.manufacturer_info.vendor_id == THIRD_REALITY_MANUFACTURER_ID and
33-
device.manufacturer_info.product_id == THIRD_REALITY_MK1_PRODUCT_ID then
32+
device.manufacturer_info.vendor_id == THIRD_REALITY_MK1_FINGERPRINT.vendor_id and
33+
device.manufacturer_info.product_id == THIRD_REALITY_MK1_FINGERPRINT.product_id then
34+
log.info("Using Third Reality MK1 sub driver")
3435
return true
3536
end
3637
return false

0 commit comments

Comments
 (0)