diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-02-06 20:42:35 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-02-06 20:42:35 +0100 |
commit | 1687077b0a63417ad4dce58f6c869a6e115d9b72 (patch) | |
tree | ec1d4ac5ea55b732c13c12c0c0e67739afa93ef8 /tex/context/base/mkiv/util-evo.lua | |
parent | 7ce2f30f31421eb46d07ff65cbf9fcbda1d6612a (diff) | |
download | context-1687077b0a63417ad4dce58f6c869a6e115d9b72.tar.gz |
2018-02-06 18:19:00
Diffstat (limited to 'tex/context/base/mkiv/util-evo.lua')
-rw-r--r-- | tex/context/base/mkiv/util-evo.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/util-evo.lua b/tex/context/base/mkiv/util-evo.lua index 25ad7f94d..7f0b59ac4 100644 --- a/tex/context/base/mkiv/util-evo.lua +++ b/tex/context/base/mkiv/util-evo.lua @@ -75,6 +75,12 @@ local defaultpresets = { }, } +local validzonetypes = { + ZoneTemperatureControl = true, + RadiatorZone = true, + ZoneValves = true, +} + local function validfile(presets,filename) if lfs.isfile(filename) then -- we're okay @@ -472,7 +478,7 @@ local function geteverything(presets,noschedules) if zonestatus and gatewayzone then local zonename = zonestatus.name local zoneid = zonestatus.zoneId - if gatewayzone.zoneType == "ZoneTemperatureControl" and zonename == gatewayzone.name then + if validzonetypes[gatewayzone.zoneType] and zonename == gatewayzone.name then gatewayzone.heatSetpointStatus = zonestatus.heatSetpointStatus gatewayzone.temperatureStatus = zonestatus.temperatureStatus local zonestatus = usedzones[zonename] -- findzone(states,zonename) @@ -530,8 +536,7 @@ local function gettemperatures(presets) if zones then local z = s[i].zones for i=1,#zones do - local zone = zones[i] - if zone.zoneType == "ZoneTemperatureControl" then + if validzonetypes[zone.zoneType] then local z = z[i] if z.name == zone.name then zone.temperatureStatus = z.temperatureStatus @@ -613,7 +618,7 @@ local function loadtemperatures(presets) local summary = { time = status.time } for i=1,#zones do local zone = zones[i] - if zone.zoneType == "ZoneTemperatureControl" then + if validzonetypes[zone.zoneType] then summary[#summary+1] = updatezone(presets,zone.name,zone) end end |