@@ -19,7 +19,6 @@ local im = require "st.matter.interaction_model"
19
19
local log = require " log"
20
20
21
21
local COMPONENT_TO_ENDPOINT_MAP = " __component_to_endpoint_map"
22
- local INITIAL_PRESS_ONLY = " __initial_press_only"
23
22
24
23
---- ---------------------------------------------------------------------------------
25
24
-- Third Reality MK1 specifics
@@ -37,10 +36,6 @@ local function is_third_reality_mk1(opts, driver, device)
37
36
return false
38
37
end
39
38
40
- local function set_field_for_endpoint (device , field , endpoint , value , additional_params )
41
- device :set_field (string.format (" %s_%d" , field , endpoint ), value , additional_params )
42
- end
43
-
44
39
local function endpoint_to_component (device , ep )
45
40
local map = device :get_field (COMPONENT_TO_ENDPOINT_MAP ) or {}
46
41
for component , endpoint in pairs (map ) do
@@ -63,7 +58,6 @@ local function configure_buttons(device)
63
58
local ms_eps = device :get_endpoints (clusters .Switch .ID , {feature_bitmap = clusters .Switch .types .SwitchFeature .MOMENTARY_SWITCH })
64
59
for _ , ep in ipairs (ms_eps ) do
65
60
if device .profile .components [endpoint_to_component (device , ep )] then
66
- set_field_for_endpoint (device , INITIAL_PRESS_ONLY , ep , true , {persist = true })
67
61
device .log .info_with ({hub_logs = true }, string.format (" Configuring Supported Values for generic switch endpoint %d" , ep ))
68
62
local supportedButtonValues_event = capabilities .button .supportedButtonValues ({" pushed" }, {visibility = {displayed = false }})
69
63
device :emit_event_for_endpoint (ep , supportedButtonValues_event )
@@ -91,9 +85,7 @@ local function device_init(driver, device)
91
85
device :subscribe ()
92
86
end
93
87
94
- local function device_added (driver , device )
95
- device_init (driver , device )
96
- end
88
+ local function device_added (driver , device ) end
97
89
98
90
local function info_changed (driver , device , event , args )
99
91
if device .profile .id ~= args .old_st_store .profile .id then
0 commit comments