Skip to content

Commit

Permalink
add test-profile into init for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hcarter-775 committed Jun 14, 2024
1 parent 6942e71 commit 91cc45c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/SmartThings/matter-thermostat/src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ local function component_to_endpoint(device, component_name)
end

local function device_init(driver, device)

-- for testing purposes
local profile_name = "test-profile"
device:try_update_metadata({profile = profile_name})

-- original init
device:subscribe()
device:set_component_to_endpoint_fn(component_to_endpoint)

Expand Down Expand Up @@ -392,7 +398,7 @@ local function do_configure(driver, device)
if #wind_eps > 0 then
profile_name = profile_name .. "-wind"
end

profile_name = profile_name .. "-thermostat"
if #humidity_eps > 0 and #fan_eps > 0 then
profile_name = profile_name .. "-humidity" .. "-fan"
Expand Down

0 comments on commit 91cc45c

Please sign in to comment.