Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Pull mqtt_root_topic from config.yaml if defined. #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyhydroquebec/mqtt_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ def read_config(self):
with open(os.environ['CONFIG']) as fhc:
self.config = load(fhc, Loader=Loader)
self.timeout = self.config.get('timeout', 30)
# 6 hours
self.frequency = self.config.get('frequency', None)
if 'mqtt_root_topic' in self.config:
self.mqtt_root_topic = self.config.get('mqtt_root_topic')

async def _init_main_loop(self):
"""Init before starting main loop."""
Expand Down