I have added a MQTT device_category transmission to my device sensors. Older versions of HomeAssistant refuse to recognize this element and the automatic configuration does not work.
* Exception in discovery_callback when dispatching 'mqtt_discovery_updated_('sensor', 'switcher_test_2 device_temperature')': ({'state_topic': 'devices/switcher_test_2/state', 'device': {'model': 'LWO6S', 'identifiers': ['switcher_test_2'], 'name': 'switcher_test_2', 'manufacturer': 'Volgunov Andrey'}, 'device_class': 'temperature', 'entity_category': 'diagnostic', 'name': 'switcher_test_2 Device temperature', 'expire_after': 180, 'unique_id': 'switcher_test_2_sensor_device_temperature', 'json_attributes_topic': 'devices/switcher_test_2/state', 'unit_of_measurement': 'Ā°C', 'value_template': '{{ value_json.device_temperature }}', 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 449, in discovery_callback await self._discovery_update(payload) File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 592, in discovery_update config = self.config_schema()(discovery_payload) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 218, in __call__ return self._exec((Schema(val) for val in self.validators), v) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 341, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 337, in _exec v = func(v) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable return schema(data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['entity_category']