Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #98 from jwillemsen/jwi-fixtankstate
Browse files Browse the repository at this point in the history
Fixed setting of tank state
  • Loading branch information
jwillemsen authored Feb 24, 2023
2 parents 038d53f + 7dff04a commit 92d3094
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions custom_components/daikin_residential_altherma/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async def async_set_tank_state(self, tank_state):
if tank_state == STATE_HEAT_PUMP:
if self._device.getValue(ATTR_TANK_ON_OFF) != ATTR_STATE_ON:
return await self._device.setValue(ATTR_TANK_ON_OFF, ATTR_STATE_ON)
await self._device.setValue(ATTR_TANK_POWERFUL, ATTR_STATE_OFF)
return await self._device.setValue(ATTR_TANK_POWERFUL, ATTR_STATE_OFF)
_LOGGER.warning("Invalid tank state: %s", tank_state)
return None

Expand Down Expand Up @@ -215,9 +215,7 @@ def operation_list(self):

async def async_set_operation_mode(self, operation_mode):
"""Set new target tank operation mode."""
_LOGGER.info("Setting operation mode %s", operation_mode)
tank_state = HA_TANK_MODE_TO_DAIKIN[operation_mode]
await self.async_set_tank_state(tank_state)
await self.async_set_tank_state(operation_mode)

@property
def device_info(self):
Expand Down

0 comments on commit 92d3094

Please sign in to comment.