Fix entity category for sensor fails mqtt sensor platform setup (#103449)

This commit is contained in:
Jan Bouwhuis 2023-11-08 00:03:47 +01:00 committed by GitHub
parent a11091890f
commit cbccdbc6fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 125 additions and 33 deletions

View file

@ -88,7 +88,7 @@ PLATFORM_SCHEMA_MODERN = vol.All(
# Deprecated in HA Core 2021.11.0 https://github.com/home-assistant/core/pull/54840
# Removed in HA Core 2023.6.0
cv.removed(CONF_LAST_RESET_TOPIC),
validate_sensor_entity_category,
validate_sensor_entity_category(sensor.DOMAIN, discovery=False),
_PLATFORM_SCHEMA_BASE,
)
@ -96,7 +96,7 @@ DISCOVERY_SCHEMA = vol.All(
# Deprecated in HA Core 2021.11.0 https://github.com/home-assistant/core/pull/54840
# Removed in HA Core 2023.6.0
cv.removed(CONF_LAST_RESET_TOPIC),
validate_sensor_entity_category,
validate_sensor_entity_category(sensor.DOMAIN, discovery=True),
_PLATFORM_SCHEMA_BASE.extend({}, extra=vol.REMOVE_EXTRA),
)