diff --git a/pyhydroquebec/mqtt_daemon.py b/pyhydroquebec/mqtt_daemon.py index 79fc51b..b34ba2d 100644 --- a/pyhydroquebec/mqtt_daemon.py +++ b/pyhydroquebec/mqtt_daemon.py @@ -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."""