summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-11-15 23:46:30 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-11-15 23:46:30 +0100
commitd3ddabbb5b5f45bac3da8cb51d3e63810aa2d4ca (patch)
tree7dc43a26a4358a0f528c8a79289bbff1813ebed5 /scripts
parent6f55552ca1456f0a2d50d1d0fdc8dc813d9ace77 (diff)
downloadcontext-d3ddabbb5b5f45bac3da8cb51d3e63810aa2d4ca.tar.gz
2017-11-15 22:14:00
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-evohome.lua18
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/context/lua/mtx-evohome.lua b/scripts/context/lua/mtx-evohome.lua
index 43479c072..671666493 100644
--- a/scripts/context/lua/mtx-evohome.lua
+++ b/scripts/context/lua/mtx-evohome.lua
@@ -56,8 +56,7 @@ local files = environment.files
function scripts.evohome.collect()
local presets = arguments.presets
- local delay = tonumber(arguments.delay) or 12*60*60
-
+ local delay = tonumber(arguments.delay) or 15*60*60
if presets then
presets = utilities.evohome.loadpresets(presets)
end
@@ -81,8 +80,23 @@ function scripts.evohome.collect()
end
end
+
+function scripts.evohome.update()
+ local presets = arguments.presets
+ if presets then
+ presets = utilities.evohome.loadpresets(presets)
+ end
+ if presets then
+ utilities.evohome.geteverything(presets)
+ else
+ report("invalid preset file")
+ end
+end
+
if environment.argument("collect") then
scripts.evohome.collect()
+elseif environment.argument("update") then
+ scripts.evohome.update()
elseif environment.argument("exporthelp") then
application.export(environment.argument("exporthelp"),environment.files[1])
else