Skip to content

Commit

Permalink
Merge pull request #111 from marcolivierarsenault/fix_slow_loop_when_…
Browse files Browse the repository at this point in the history
…stopped_2

Fix slow loop when stopped 2
  • Loading branch information
marcolivierarsenault authored Nov 26, 2023
2 parents dbfbfec + d948a6e commit 561d427
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tefnut/control/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class TefnutController:

def __init__(self):
self.humidifier = humidifier
self.humidifier.turn_off()

logger.info("starting ecobee device")
self.ecobee = ee("pyecobee_db")
Expand Down Expand Up @@ -117,7 +118,8 @@ def humidifier_controller(self):

if self.state["mode"] == MODE.OFF:
logger.debug("Off")
self.humidifier.turn_off()
if self.state["state"] != STATE.OFF:
self.humidifier.turn_off()
self.state["state"] = STATE.OFF
return -7

Expand Down
2 changes: 1 addition & 1 deletion tefnut/webui/webservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
scheduler = APScheduler()

persist = True
BACKGROUND_THREAD_TIMER = 60
BACKGROUND_THREAD_TIMER = 10

sha = ""
version = ""
Expand Down

0 comments on commit 561d427

Please sign in to comment.