Collection of changing entity properties to class attributes - 2 (#51345)
This commit is contained in:
parent
e5dff49440
commit
fcdd8b11a6
24 changed files with 70 additions and 215 deletions
|
@ -35,6 +35,8 @@ HA_MODE_TO_HK = {
|
|||
class HomeKitHumidifier(HomeKitEntity, HumidifierEntity):
|
||||
"""Representation of a HomeKit Controller Humidifier."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_HUMIDIFIER
|
||||
|
||||
def get_characteristic_types(self):
|
||||
"""Define the homekit characteristics the entity cares about."""
|
||||
return [
|
||||
|
@ -45,11 +47,6 @@ class HomeKitHumidifier(HomeKitEntity, HumidifierEntity):
|
|||
CharacteristicsTypes.RELATIVE_HUMIDITY_HUMIDIFIER_THRESHOLD,
|
||||
]
|
||||
|
||||
@property
|
||||
def device_class(self) -> str:
|
||||
"""Return the device class of the device."""
|
||||
return DEVICE_CLASS_HUMIDIFIER
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Return the list of supported features."""
|
||||
|
@ -140,6 +137,8 @@ class HomeKitHumidifier(HomeKitEntity, HumidifierEntity):
|
|||
class HomeKitDehumidifier(HomeKitEntity, HumidifierEntity):
|
||||
"""Representation of a HomeKit Controller Humidifier."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_DEHUMIDIFIER
|
||||
|
||||
def get_characteristic_types(self):
|
||||
"""Define the homekit characteristics the entity cares about."""
|
||||
return [
|
||||
|
@ -151,11 +150,6 @@ class HomeKitDehumidifier(HomeKitEntity, HumidifierEntity):
|
|||
CharacteristicsTypes.RELATIVE_HUMIDITY_DEHUMIDIFIER_THRESHOLD,
|
||||
]
|
||||
|
||||
@property
|
||||
def device_class(self) -> str:
|
||||
"""Return the device class of the device."""
|
||||
return DEVICE_CLASS_DEHUMIDIFIER
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Return the list of supported features."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue