Support for is_configuration flag on zwave entities

This commit is contained in:
Fabio Manganiello 2023-01-03 23:13:34 +01:00
parent c32aecece3
commit 01727f53bc
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -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'):