Add select entity to Overkiz integration (#62916)
This commit is contained in:
parent
c3c14563e5
commit
5e3bfabfcf
5 changed files with 173 additions and 0 deletions
|
@ -1,9 +1,12 @@
|
|||
"""Parent class for every Overkiz device."""
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import unique
|
||||
|
||||
from pyoverkiz.enums import OverkizAttribute, OverkizState
|
||||
from pyoverkiz.models import Device
|
||||
|
||||
from homeassistant.backports.enum import StrEnum
|
||||
from homeassistant.helpers.entity import DeviceInfo, EntityDescription
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
|
||||
|
@ -95,3 +98,12 @@ class OverkizDescriptiveEntity(OverkizEntity):
|
|||
self.entity_description = description
|
||||
self._attr_name = f"{super().name} {self.entity_description.name}"
|
||||
self._attr_unique_id = f"{super().unique_id}-{self.entity_description.key}"
|
||||
|
||||
|
||||
# Used by translations of state and select sensors
|
||||
@unique
|
||||
class OverkizDeviceClass(StrEnum):
|
||||
"""Device class for Overkiz specific devices."""
|
||||
|
||||
OPEN_CLOSED_PEDESTRIAN = "overkiz__open_closed_pedestrian"
|
||||
MEMORIZED_SIMPLE_VOLUME = "overkiz__memorized_simple_volume"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue