Add current_humidity attribute on homekit_controller humidifier (#94937)
This commit is contained in:
parent
d6dc738a12
commit
d6b89b6f7b
2 changed files with 25 additions and 0 deletions
|
@ -73,6 +73,11 @@ class HomeKitHumidifier(HomeKitEntity, HumidifierEntity):
|
|||
CharacteristicsTypes.RELATIVE_HUMIDITY_HUMIDIFIER_THRESHOLD
|
||||
)
|
||||
|
||||
@property
|
||||
def current_humidity(self) -> int | None:
|
||||
"""Return the current humidity."""
|
||||
return self.service.value(CharacteristicsTypes.RELATIVE_HUMIDITY_CURRENT)
|
||||
|
||||
@property
|
||||
def mode(self) -> str | None:
|
||||
"""Return the current mode, e.g., home, auto, baby.
|
||||
|
@ -177,6 +182,11 @@ class HomeKitDehumidifier(HomeKitEntity, HumidifierEntity):
|
|||
CharacteristicsTypes.RELATIVE_HUMIDITY_DEHUMIDIFIER_THRESHOLD
|
||||
)
|
||||
|
||||
@property
|
||||
def current_humidity(self) -> int | None:
|
||||
"""Return the current humidity."""
|
||||
return self.service.value(CharacteristicsTypes.RELATIVE_HUMIDITY_CURRENT)
|
||||
|
||||
@property
|
||||
def mode(self) -> str | None:
|
||||
"""Return the current mode, e.g., home, auto, baby.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue