mirror of
https://github.com/home-assistant/core
synced 2024-07-15 09:42:11 +02:00
Remove gree switch entity description required fields mixin (#105849)
This commit is contained in:
parent
ed9e738985
commit
40f30675dd
@ -21,19 +21,14 @@ from .const import COORDINATORS, DISPATCH_DEVICE_DISCOVERED, DOMAIN
|
||||
from .entity import GreeEntity
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class GreeRequiredKeysMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(kw_only=True, frozen=True)
|
||||
class GreeSwitchEntityDescription(SwitchEntityDescription):
|
||||
"""Describes a Gree switch entity."""
|
||||
|
||||
get_value_fn: Callable[[Device], bool]
|
||||
set_value_fn: Callable[[Device, bool], None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class GreeSwitchEntityDescription(SwitchEntityDescription, GreeRequiredKeysMixin):
|
||||
"""Describes Gree switch entity."""
|
||||
|
||||
|
||||
def _set_light(device: Device, value: bool) -> None:
|
||||
"""Typed helper to set device light property."""
|
||||
device.light = value
|
||||
|
Loading…
Reference in New Issue
Block a user