Skip to content

Commit 2a1d09d

Browse files
committed
persist the color temp field
1 parent 4cdf471 commit 2a1d09d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • drivers/SmartThings/zigbee-switch/src/color_temp_range_handlers

drivers/SmartThings/zigbee-switch/src/color_temp_range_handlers/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ local function color_temp_min_mireds_handler(driver, device, value, zb_rx)
1717
return
1818
end
1919
local temp_in_kelvin = utils.round(switch_utils.MIREDS_CONVERSION_CONSTANT / temp_in_mired)
20-
device:set_field(switch_utils.KELVIN_MAX..endpoint, temp_in_kelvin)
20+
device:set_field(switch_utils.KELVIN_MAX..endpoint, temp_in_kelvin, {persist = true})
2121
local min = device:get_field(switch_utils.KELVIN_MIN..endpoint)
2222
if min ~= nil then
2323
if temp_in_kelvin > min then
@@ -39,7 +39,7 @@ local function color_temp_max_mireds_handler(driver, device, value, zb_rx)
3939
return
4040
end
4141
local temp_in_kelvin = utils.round(switch_utils.MIREDS_CONVERSION_CONSTANT / temp_in_mired)
42-
device:set_field(switch_utils.KELVIN_MIN..endpoint, temp_in_kelvin)
42+
device:set_field(switch_utils.KELVIN_MIN..endpoint, temp_in_kelvin, {persist = true})
4343
local max = device:get_field(switch_utils.KELVIN_MAX..endpoint)
4444
if max ~= nil then
4545
if temp_in_kelvin < max then

0 commit comments

Comments
 (0)