From 9eab526e474a114551cd48979bdbaf8399cfe237 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 13 May 2021 22:37:55 +0200 Subject: [PATCH] Specify propertyKey on set_value() if exposed/required by the value payload [see #188] --- platypush/plugins/zwave/mqtt.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platypush/plugins/zwave/mqtt.py b/platypush/plugins/zwave/mqtt.py index 1fb12bfa..63279b90 100644 --- a/platypush/plugins/zwave/mqtt.py +++ b/platypush/plugins/zwave/mqtt.py @@ -209,6 +209,8 @@ class ZwaveMqttPlugin(MqttPlugin, ZwaveBasePlugin): 'is_read_only': value['readable'] and not value['writeable'], 'is_write_only': value['writeable'] and not value['readable'], 'last_update': cls._convert_timestamp(value.get('lastUpdate')), + **({'property_key': value['propertyKey']} if 'propertyKey' in value else {}), + **({'property_key_name': value['propertyKeyName']} if 'propertyKeyName' in value else {}), } @staticmethod @@ -932,7 +934,8 @@ class ZwaveMqttPlugin(MqttPlugin, ZwaveBasePlugin): 'nodeId': value['node_id'], 'commandClass': value['command_class'], 'endpoint': value.get('endpoint', 0), - 'property': value['property_id'] + 'property': value['property_id'], + **({'propertyKey': value['property_key']} if 'property_key' in value else {}), }, data, **kwargs) @action