Skip to content

Commit

Permalink
Disable debug YAML in appDaemon mode (#1710)
Browse files Browse the repository at this point in the history
* Disable debug YAML in appDaemon mode

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
springfall2008 and pre-commit-ci-lite[bot] authored Dec 8, 2024
1 parent 9f3223c commit 45c2897
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,27 @@
import hashlib
import traceback

IS_APPDAEMON = False

# Import AppDaemon or our standalone wrapper
try:
import adbase as ad
import appdaemon.plugins.hass.hassapi as hass

IS_APPDAEMON = True
except:
import hass as hass

IS_APPDAEMON = False

import pytz
import requests
import yaml
from multiprocessing import Pool, cpu_count, set_start_method
import asyncio
import json

THIS_VERSION = "v8.8.3"
THIS_VERSION = "v8.8.4"

# fmt: off
PREDBAT_FILES = ["predbat.py", "config.py", "prediction.py", "gecloud.py","utils.py", "inverter.py", "ha.py", "download.py", "unit_test.py", "web.py", "predheat.py", "futurerate.py", "octopus.py", "solcast.py","execute.py", "plan.py", "fetch.py", "output.py", "userinterface.py"]
Expand Down Expand Up @@ -707,7 +713,7 @@ def update_pred(self, scheduled=True):
self.expose_config("holiday_days_left", self.holiday_days_left)
self.log("Holiday days left is now {}".format(self.holiday_days_left))

if self.debug_enable:
if self.debug_enable and not IS_APPDAEMON:
self.create_debug_yaml()

if self.had_errors:
Expand Down

0 comments on commit 45c2897

Please sign in to comment.