From 45c13e7ba26c2fed0c5987a5ac0eeee6141b34e9 Mon Sep 17 00:00:00 2001 From: Onkel Andy Date: Wed, 29 May 2024 11:47:07 +0200 Subject: [PATCH] SDP: only add returnvalue/type to data_dict if command has "reading" active --- lib/model/smartdeviceplugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model/smartdeviceplugin.py b/lib/model/smartdeviceplugin.py index 15989fba16..259243ee2d 100644 --- a/lib/model/smartdeviceplugin.py +++ b/lib/model/smartdeviceplugin.py @@ -712,7 +712,7 @@ def send_command(self, command, value=None, return_result=False, **kwargs): try: data_dict = self._commands.get_send_data(command, value, **kwargs) data_dict['command'] = command - if value is not None: + if value is not None and self._commands_read.get(command, None) is not None: data_dict['returntype'] = type(value) data_dict['returnvalue'] = value data_dict['retry'] = kwargs.get('retry') or 0