Remove unnecessary Notion entity description mixins (#108194)
This commit is contained in:
parent
0a9ec1a351
commit
70aff728fd
3 changed files with 11 additions and 18 deletions
|
@ -30,24 +30,17 @@ from .const import (
|
|||
SENSOR_SMOKE_CO,
|
||||
SENSOR_WINDOW_HINGED,
|
||||
)
|
||||
from .model import NotionEntityDescriptionMixin
|
||||
from .model import NotionEntityDescription
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class NotionBinarySensorDescriptionMixin:
|
||||
"""Define an entity description mixin for binary and regular sensors."""
|
||||
|
||||
on_state: Literal["alarm", "leak", "low", "not_missing", "open"]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class NotionBinarySensorDescription(
|
||||
BinarySensorEntityDescription,
|
||||
NotionBinarySensorDescriptionMixin,
|
||||
NotionEntityDescriptionMixin,
|
||||
BinarySensorEntityDescription, NotionEntityDescription
|
||||
):
|
||||
"""Describe a Notion binary sensor."""
|
||||
|
||||
on_state: Literal["alarm", "leak", "low", "not_missing", "open"]
|
||||
|
||||
|
||||
BINARY_SENSOR_DESCRIPTIONS = (
|
||||
NotionBinarySensorDescription(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue