From 01727f53bc645ada754ee82f5a7ba311118a4883 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 3 Jan 2023 23:13:34 +0100 Subject: [PATCH] Support for is_configuration flag on `zwave` entities --- platypush/plugins/zwave/mqtt/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platypush/plugins/zwave/mqtt/__init__.py b/platypush/plugins/zwave/mqtt/__init__.py index b9a6da28b3..0330d99bba 100644 --- a/platypush/plugins/zwave/mqtt/__init__.py +++ b/platypush/plugins/zwave/mqtt/__init__.py @@ -82,7 +82,6 @@ class ZwaveMqttPlugin(MqttPlugin, ZwaveBasePlugin): _ignored_entity_classes = { 'application_status', 'association_command_configuration', - 'configuration', 'controller_replication', 'crc16_encap', 'firmware_update_md', @@ -599,6 +598,10 @@ class ZwaveMqttPlugin(MqttPlugin, ZwaveBasePlugin): and not value.get('is_read_only') ) + @classmethod + def _is_configuration_value(cls, value: Mapping): + return cls._matches_classes(value, 'configuration') + @classmethod def _get_sensor_args( cls, value: Mapping @@ -669,6 +672,7 @@ class ZwaveMqttPlugin(MqttPlugin, ZwaveBasePlugin): 'description': value.get('help'), 'is_read_only': value.get('is_read_only'), 'is_write_only': value.get('is_write_only'), + 'is_configuration': self._is_configuration_value(value), } if value.get('last_update'):