From d78671f6cba453d95460114f6a419e792b3d9c95 Mon Sep 17 00:00:00 2001 From: BrianUK6 <121910508+BrianUK6@users.noreply.github.com> Date: Wed, 2 Aug 2023 15:23:52 +0100 Subject: [PATCH] Update startup.py for non-HA SuperTimezone define --- startup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/startup.py b/startup.py index ed33a87..6c9d715 100644 --- a/startup.py +++ b/startup.py @@ -41,7 +41,9 @@ def getInvDeets(HOST): except: logger.error("Gathering inverter details for " + str(HOST) + " failed.") return None - + +SuperTimezone={} # 02-Aug-23 default it to None so that it is defined for saving in settngs.py for non-HA usage (otherwise exception) + try: logger.debug("SUPERVISOR_TOKEN is: "+ os.getenv("SUPERVISOR_TOKEN")) isAddon=True @@ -378,4 +380,4 @@ def getInvDeets(HOST): logger.critical("Reboot requested... rebooting now") os.remove("/app/.reboot") exit() - sleep (60) \ No newline at end of file + sleep (60)