Skip to content

Commit

Permalink
fix: state of water heater E2 (#288)
Browse files Browse the repository at this point in the history
* fix: state of water heater E2

* chore(pre-commit.ci): auto fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Zkdc and pre-commit-ci[bot] authored Aug 19, 2024
1 parent 8be427c commit d38a005
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions custom_components/midea_ac_lan/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from midealocal.devices.c3 import MideaC3Device
from midealocal.devices.cd import DeviceAttributes as CDAttributes
from midealocal.devices.cd import MideaCDDevice
from midealocal.devices.e2 import DeviceAttributes as E2Attributes
from midealocal.devices.e2 import MideaE2Device
from midealocal.devices.e3 import MideaE3Device
from midealocal.devices.e6 import DeviceAttributes as E6Attributes
Expand Down Expand Up @@ -214,6 +215,13 @@ def __init__(self, device: MideaE2Device, entity_key: str) -> None:
"""Midea E2 Water Heater entity init."""
super().__init__(device, entity_key)

@property
def current_operation(self) -> str:
"""Midea E2 Water Heater current operation."""
return str(
STATE_ON if self._device.get_attribute(E2Attributes.power) else STATE_OFF,
)

@property
def min_temp(self) -> float:
"""Midea E2 Water Heater min temperature."""
Expand Down

0 comments on commit d38a005

Please sign in to comment.