Refactor entity_category str types (#62790)
This commit is contained in:
parent
377b0efc60
commit
8fd60dbd51
4 changed files with 11 additions and 10 deletions
|
@ -33,6 +33,7 @@ from homeassistant.helpers.entity import (
|
|||
ENTITY_CATEGORIES_SCHEMA,
|
||||
DeviceInfo,
|
||||
Entity,
|
||||
EntityCategory,
|
||||
async_generate_entity_id,
|
||||
)
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
@ -695,7 +696,7 @@ class MqttEntity(
|
|||
return self._config[CONF_ENABLED_BY_DEFAULT]
|
||||
|
||||
@property
|
||||
def entity_category(self) -> str | None:
|
||||
def entity_category(self) -> EntityCategory | str | None:
|
||||
"""Return the entity category if any."""
|
||||
return self._config.get(CONF_ENTITY_CATEGORY)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue