Skip to content

Commit c15c1ad

Browse files
committed
Check whether we can set the tank temperature at all
* custom_components/daikin_residential_altherma/water_heater.py:
1 parent 1c3c640 commit c15c1ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

custom_components/daikin_residential_altherma/water_heater.py

+6
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,13 @@ async def async_set_tank_temperature(self, value):
179179
"""Set new target temperature."""
180180
_LOGGER.debug("Device '%s' set tank temperature: %s", self._device.name, value)
181181
if self.current_operation == STATE_OFF:
182+
_LOGGER.debug("Device '%s' set tank temperature ignored because device is off", self._device.name)
182183
return None
184+
dht = self.domestic_hotwater_temperature
185+
if dht is not None:
186+
if dht["settable"] == False:
187+
_LOGGER.debug("Device '%s' set tank temperature ignored because tank temperature can't be set", self._device.name)
188+
return None
183189
res = await self._device.set_path(self._device.getId(), self.embedded_id, "temperatureControl", "/operationModes/heating/setpoints/domesticHotWaterTemperature", int(value))
184190
# When updating the value to the daikin cloud worked update our local cached version
185191
if res:

0 commit comments

Comments
 (0)