Skip to content

Commit

Permalink
Merge pull request #169 from fboundy/patch
Browse files Browse the repository at this point in the history
Update debug logic
  • Loading branch information
fboundy authored Mar 22, 2024
2 parents 9d88344 + 93b9819 commit 76d6fe9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/pv_opt/pv_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,16 @@ def initialize(self):
self.log("")
self.log(f"******************* PV Opt v{VERSION} *******************")
self.log("")
self.debug = DEBUG | self.args.get("debug", False)

self.debug = DEBUG
try:
subver = int(VERSION.split(".")[2])
except:
self.log("Pre-release version. Enabling debug logging")
self.debug = True

self.debug = self.args.get("debug", self.debug)

self.adapi = self.get_ad_api()
self.mqtt = self.get_plugin_api("MQTT")
self._load_tz()
Expand Down

0 comments on commit 76d6fe9

Please sign in to comment.