You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (temp_in_mired<COLOR_TEMPERATURE_MIRED_MINortemp_in_mired>COLOR_TEMPERATURE_MIRED_MAX) then
22
-
device.log.warn_with({hub_logs=true}, string.format("Device reported a color temperature %d mired outside of sane range of %.2f-%.2f", temp_in_mired, COLOR_TEMPERATURE_MIRED_MIN, COLOR_TEMPERATURE_MIRED_MAX))
15
+
if (temp_in_mired<switch_utils.COLOR_TEMPERATURE_MIRED_MINortemp_in_mired>switch_utils.COLOR_TEMPERATURE_MIRED_MAX) then
16
+
device.log.warn_with({hub_logs=true}, string.format("Device reported a color temperature %d mired outside of sane range of %.2f-%.2f", temp_in_mired, switch_utils.COLOR_TEMPERATURE_MIRED_MIN, switch_utils.COLOR_TEMPERATURE_MIRED_MAX))
@@ -40,13 +34,13 @@ local function color_temp_max_mireds_handler(driver, device, value, zb_rx)
40
34
iftemp_in_mired==nilthen
41
35
return
42
36
end
43
-
if (temp_in_mired<COLOR_TEMPERATURE_MIRED_MINortemp_in_mired>COLOR_TEMPERATURE_MIRED_MAX) then
44
-
device.log.warn_with({hub_logs=true}, string.format("Device reported a color temperature %d mired outside of sane range of %.2f-%.2f", temp_in_mired, COLOR_TEMPERATURE_MIRED_MIN, COLOR_TEMPERATURE_MIRED_MAX))
37
+
if (temp_in_mired<switch_utils.COLOR_TEMPERATURE_MIRED_MINortemp_in_mired>switch_utils.COLOR_TEMPERATURE_MIRED_MAX) then
38
+
device.log.warn_with({hub_logs=true}, string.format("Device reported a color temperature %d mired outside of sane range of %.2f-%.2f", temp_in_mired, switch_utils.COLOR_TEMPERATURE_MIRED_MIN, switch_utils.COLOR_TEMPERATURE_MIRED_MAX))
0 commit comments