Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
ae8db120e8
commit
0c2485bc03
462 changed files with 806 additions and 804 deletions
|
@ -22,14 +22,14 @@ from .const import DOMAIN
|
|||
from .coordinator import GitHubDataUpdateCoordinator
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(frozen=True)
|
||||
class BaseEntityDescriptionMixin:
|
||||
"""Mixin for required GitHub base description keys."""
|
||||
|
||||
value_fn: Callable[[dict[str, Any]], StateType]
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(frozen=True)
|
||||
class BaseEntityDescription(SensorEntityDescription):
|
||||
"""Describes GitHub sensor entity default overrides."""
|
||||
|
||||
|
@ -38,7 +38,7 @@ class BaseEntityDescription(SensorEntityDescription):
|
|||
avabl_fn: Callable[[dict[str, Any]], bool] = lambda data: True
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(frozen=True)
|
||||
class GitHubSensorEntityDescription(BaseEntityDescription, BaseEntityDescriptionMixin):
|
||||
"""Describes GitHub issue sensor entity."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue