#621 support environment_detector peripheral type

This commit is contained in:
Mikayla
2025-06-16 15:07:56 +00:00
parent 264edc0030
commit 6d3b35a41d
5 changed files with 11 additions and 11 deletions

View File

@@ -195,7 +195,7 @@ local function self_check()
valid = is_int_min_max(entry.unit, 1, 4)
elseif p_type == "dynamicValve" then
valid = (entry.unit == nil and is_int_min_max(entry.index, 1, 4)) or is_int_min_max(entry.unit, 1, 4)
elseif p_type == "environmentDetector" then
elseif p_type == "environmentDetector" or p_type == "environment_detector" then
valid = (entry.unit == nil or is_int_min_max(entry.unit, 1, 4)) and util.is_int(entry.index)
else
valid = true