Browse Source

Merge pull request #985 from schuellerf/development03

Fix suntimes working if mqtt is enabled but suntimes is disabled
pull/1005/head
Lukas Pusch 2 years ago
committed by GitHub
parent
commit
59cea2ccaa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      tools/rpi/hoymiles/__main__.py

2
tools/rpi/hoymiles/__main__.py

@ -101,7 +101,7 @@ class SunsetHandler:
logging.info (f'Woke up...')
def sun_status2mqtt(self, dtu_ser, dtu_name):
if not mqtt_client:
if not mqtt_client or not self.suntimes:
return
local_sunrise = self.suntimes.riselocal(datetime.now()).strftime("%d.%m.%YT%H:%M")
local_sunset = self.suntimes.setlocal(datetime.now()).strftime("%d.%m.%YT%H:%M")

Loading…
Cancel
Save