From d69da748437b59fc5e8dc9298af087a1043cc761 Mon Sep 17 00:00:00 2001 From: Pablo Acosta-Serafini <63065092+pmacostapdi@users.noreply.github.com> Date: Fri, 26 Feb 2021 09:38:28 -0500 Subject: [PATCH] timeswitch node: time zone support; do not mark as misconfigured when sunrise/sunset not used and lat/lon not given (#757) * timeswitch node: a) do not mark node as misconfigured if sunrise and sunset are not used and latitude/longitude are not given. b) support for specifying time zone when on and/or off times are not specified as sunrise and/or sunset. * Replaced moment dependency with spacetime * Timezone defaults to UTC for compatibility with previous node version --- time/timeswitch/package.json | 1 + time/timeswitch/timeswitch.html | 646 +++++++++++++++++++++++++++++++- time/timeswitch/timeswitch.js | 9 +- 3 files changed, 649 insertions(+), 7 deletions(-) diff --git a/time/timeswitch/package.json b/time/timeswitch/package.json index acaf2bf0..6d0fca3b 100644 --- a/time/timeswitch/package.json +++ b/time/timeswitch/package.json @@ -3,6 +3,7 @@ "version" : "0.0.8", "description" : "A Node-RED node to provide a simple timeswitch to schedule daily on/off events.", "dependencies" : { + "spacetime": "^6.12.5", "suncalc": "^1.8.0" }, "repository" : { diff --git a/time/timeswitch/timeswitch.html b/time/timeswitch/timeswitch.html index 910cca6a..52506229 100644 --- a/time/timeswitch/timeswitch.html +++ b/time/timeswitch/timeswitch.html @@ -214,6 +214,616 @@ +
+ + +
+
@@ -280,6 +890,15 @@