From 31b110a06c3f6d80db90956a29b8d524a42c093a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 22 Jan 2021 16:24:43 +0100 Subject: [PATCH] FIX: zigbee2mqtt applies different logic to / and //get --- platypush/plugins/zigbee/mqtt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/zigbee/mqtt.py b/platypush/plugins/zigbee/mqtt.py index ea758f42e..e90a8ee74 100644 --- a/platypush/plugins/zigbee/mqtt.py +++ b/platypush/plugins/zigbee/mqtt.py @@ -333,8 +333,10 @@ class ZigbeeMqttPlugin(MqttPlugin): (default: query the default configured device). :return: Key->value map of the device properties. """ - properties = self.publish(topic=self._topic(device + '/get'), - reply_topic=self._topic(device), msg='', **self._mqtt_args(**kwargs)).output + properties = self.publish(topic=self._topic(device + ('/get' if property else '')), + reply_topic=self._topic(device), + msg={property: ''} if property else '', + **self._mqtt_args(**kwargs)).output if property: assert property in properties, 'No such property: ' + property