zigbee.mqtt backend configuration should be fetched from the zigbee.mqtt plugin configuration if not reported

This commit is contained in:
Fabio Manganiello 2021-09-17 22:35:01 +02:00
parent 1a314ffd6b
commit a1cd25fe5a
1 changed files with 10 additions and 1 deletions

View File

@ -101,6 +101,11 @@ class ZigbeeMqttBackend(MqttBackend):
'password': password or plugin.password,
}
kwargs = {
**kwargs,
**self.server_info,
}
listeners = [{
**self.server_info,
'topics': [
@ -109,7 +114,11 @@ class ZigbeeMqttBackend(MqttBackend):
],
}]
super().__init__(subscribe_default_topic=False, listeners=listeners, client_id=client_id, *args, **kwargs)
super().__init__(
*args, subscribe_default_topic=False,
listeners=listeners, client_id=client_id, **kwargs
)
if not client_id:
self.client_id += '-zigbee-mqtt'