When starting Home Assistant (2024.3.1) i am getting an error on some MQTT autodiscovered sensors. This is the error:
Logger: homeassistant.components.sensor
Quelle: helpers/entity_platform.py:576
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 13:30:45 (4 Vorkommnisse)
Zuletzt protokolliert: 13:30:45
Error adding entity sensor.picframe_picframe_date_from for domain sensor with platform mqtt
Error adding entity sensor.picframe_picframe_date_to for domain sensor with platform mqtt
Error adding entity sensor.picframe_picframe_location_filter for domain sensor with platform mqtt
Error adding entity sensor.picframe_picframe_tags_filter for domain sensor with platform mqtt
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 576, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 865, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1326, in add_to_platform_finish
await self.async_internal_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 302, in async_internal_added_to_hass
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity sensor.picframe_picframe_date_from cannot be added as the entity category is set to config
This is the entry in MQTT (one of the sensors):
homeassistant/sensor/picframe_date_from/config
{"name": "picframe_date_from", "icon": "mdi:calendar-arrow-left", "value_template": "{{ value_json.date_from}}", "avty_t": "homeassistant/switch/picframe/available", "uniq_id": "picframe_date_from", "dev": {"ids": ["picframe"]}, "state_topic": "homeassistant/sensor/picframe/state", "entity_category": "config"}
I already searched and found, that the entity_category config is not allowed, should be diagnostic or none. For testing, i set the MQTT Topics to diagnostic (or deleted the line with entity_category), the error is still the same.
Is there something else to change? All others MQTT autodiscovered sensors work fineā¦