diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-11-18 16:12:36 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-11-18 16:12:36 +0100 |
commit | 744095aa4676553437db0d71c281a74557a3222f (patch) | |
tree | bfdf5d203b5fbfa44ee7db705d3b3475361ad28f /tex/context/base/mkiv/util-evo.lua | |
parent | e2ee706a3114129601a30908d6b8cbb57068d32c (diff) | |
download | context-744095aa4676553437db0d71c281a74557a3222f.tar.gz |
2018-11-18 14:16:00
Diffstat (limited to 'tex/context/base/mkiv/util-evo.lua')
-rw-r--r-- | tex/context/base/mkiv/util-evo.lua | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/tex/context/base/mkiv/util-evo.lua b/tex/context/base/mkiv/util-evo.lua index 19c394c79..e77b7963a 100644 --- a/tex/context/base/mkiv/util-evo.lua +++ b/tex/context/base/mkiv/util-evo.lua @@ -535,27 +535,29 @@ local function gettemperatures(presets) for i=1,#data do local gateways = data[i].gateways local locationinfo = data[i].locationInfo - local locationid = locationinfo.locationId - if gateways then - local status = getstatus(presets,locationid,locationinfo.name) - if status then - for i=1,#gateways do - local g = status.gateways[i] - local gateway = gateways[i] - local systems = gateway.temperatureControlSystems - if systems then - local s = g.temperatureControlSystems - for i=1,#systems do - local zones = systems[i].zones - if zones then - local z = s[i].zones - for i=1,#zones do - local zone = zones[i] - if validzonetypes[zone.zoneType] then - local z = z[i] - if z.name == zone.name then - zone.temperatureStatus = z.temperatureStatus - updated = true + if locationinfo then + local locationid = locationinfo.locationId + if gateways then + local status = getstatus(presets,locationid,locationinfo.name) + if status then + for i=1,#gateways do + local g = status.gateways[i] + local gateway = gateways[i] + local systems = gateway.temperatureControlSystems + if systems then + local s = g.temperatureControlSystems + for i=1,#systems do + local zones = systems[i].zones + if zones then + local z = s[i].zones + for i=1,#zones do + local zone = zones[i] + if validzonetypes[zone.zoneType] then + local z = z[i] + if z.name == zone.name then + zone.temperatureStatus = z.temperatureStatus + updated = true + end end end end @@ -563,7 +565,11 @@ local function gettemperatures(presets) end end end + else + report("no gateways") end + else + report("no location info") end end if updated then |