spacemanspiff2007 / sml2mqtt

Sml to MQTT Bridge
GNU General Public License v3.0
25 stars 8 forks source link

Fix access to configuration #9

Closed git-developer closed 2 years ago

git-developer commented 2 years ago

Fixes https://github.com/spacemanspiff2007/sml2mqtt/commit/1c5acf082d0148472e3505748c51f21d49de5c29:

sml2mqtt  | [2022-03-26 07:00:43,127] [sml                    ] INFO     | Starting V1.0.0
sml2mqtt  | [2022-03-26 07:00:43,133] [sml.mqtt               ] ERROR    | Traceback (most recent call last):
sml2mqtt  | [2022-03-26 07:00:43,134] [sml.mqtt               ] ERROR    |   File "/usr/lib/python3.9/site-packages/sml2mqtt/mqtt/mqtt.py", line 74, in _connect_to_broker
sml2mqtt  | [2022-03-26 07:00:43,135] [sml.mqtt               ] ERROR    |     config.mqtt.base.topic, config.mqtt.base.qos, config.mqtt.base.retain
sml2mqtt  | [2022-03-26 07:00:43,136] [sml.mqtt               ] ERROR    |   File "/usr/lib/python3.9/site-packages/easyconfig/config_objs/object_config.py", line 112, in __getattr__
sml2mqtt  | [2022-03-26 07:00:43,137] [sml.mqtt               ] ERROR    |     return getattr(self._last_model, item)
sml2mqtt  | [2022-03-26 07:00:43,138] [sml.mqtt               ] ERROR    | AttributeError: 'MqttConfig' object has no attribute 'base'

Relates https://github.com/spacemanspiff2007/sml2mqtt/issues/7