forked from platypush/platypush
FIX: zigbee2mqtt applies different logic to /<device_name> and /<device_name>/get
This commit is contained in:
parent
717ad5d88c
commit
31b110a06c
1 changed files with 4 additions and 2 deletions
|
@ -333,8 +333,10 @@ class ZigbeeMqttPlugin(MqttPlugin):
|
||||||
(default: query the default configured device).
|
(default: query the default configured device).
|
||||||
:return: Key->value map of the device properties.
|
:return: Key->value map of the device properties.
|
||||||
"""
|
"""
|
||||||
properties = self.publish(topic=self._topic(device + '/get'),
|
properties = self.publish(topic=self._topic(device + ('/get' if property else '')),
|
||||||
reply_topic=self._topic(device), msg='', **self._mqtt_args(**kwargs)).output
|
reply_topic=self._topic(device),
|
||||||
|
msg={property: ''} if property else '',
|
||||||
|
**self._mqtt_args(**kwargs)).output
|
||||||
|
|
||||||
if property:
|
if property:
|
||||||
assert property in properties, 'No such property: ' + property
|
assert property in properties, 'No such property: ' + property
|
||||||
|
|
Loading…
Reference in a new issue