From a1cd25fe5a3bfb9121d57fb9e02e460313471e3d Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 17 Sep 2021 22:35:01 +0200 Subject: [PATCH] zigbee.mqtt backend configuration should be fetched from the zigbee.mqtt plugin configuration if not reported --- platypush/backend/zigbee/mqtt/__init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/platypush/backend/zigbee/mqtt/__init__.py b/platypush/backend/zigbee/mqtt/__init__.py index 35542b0865..fd805596eb 100644 --- a/platypush/backend/zigbee/mqtt/__init__.py +++ b/platypush/backend/zigbee/mqtt/__init__.py @@ -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'