Improve opentherm_gw state detection (#16809)

Only show the platform in STATE_HEAT when the boiler is actually heating.
This commit is contained in:
mvn23 2018-09-23 22:16:24 +02:00 committed by Martin Hjelmare
parent 2258c56d34
commit 329d9dfc06

View file

@ -72,8 +72,9 @@ class OpenThermGateway(ClimateDevice):
"""Receive and handle a new report from the Gateway."""
_LOGGER.debug("Received report: %s", status)
ch_active = status.get(self.pyotgw.DATA_SLAVE_CH_ACTIVE)
flame_on = status.get(self.pyotgw.DATA_SLAVE_FLAME_ON)
cooling_active = status.get(self.pyotgw.DATA_SLAVE_COOLING_ACTIVE)
if ch_active:
if ch_active and flame_on:
self._current_operation = STATE_HEAT
elif cooling_active:
self._current_operation = STATE_COOL