Skip to content

Commit

Permalink
feat(AC): support current_humidity for AC device climate (#411)
Browse files Browse the repository at this point in the history
* Support `current_humidity` for `climate`

* Cast to None & add comment

* Move from `MideaClimate` to `MideaACClimate`
  • Loading branch information
semyonchetvertnyh authored Dec 16, 2024
1 parent 5c21f56 commit b0be2cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions custom_components/midea_ac_lan/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@ def swing_mode(self) -> str:
) + (2 if self._device.get_attribute(ACAttributes.swing_horizontal) else 0)
return self._attr_swing_modes[swing_mode]

@property
def current_humidity(self) -> float | None:
"""Midea Climate current humidity."""
return cast(float | None, self._device.get_attribute("indoor_humidity"))

@property
def outdoor_temperature(self) -> float:
"""Midea AC Climate outdoor temperature."""
Expand Down

0 comments on commit b0be2cb

Please sign in to comment.