From 925fa25ac75221b22aa4d8e616f3cbc2bebc7bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=B8yer=20Iversen?= Date: Sat, 8 Feb 2020 16:00:20 +0100 Subject: [PATCH] Fix hvac_action for mill (#31630) --- homeassistant/components/mill/climate.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/mill/climate.py b/homeassistant/components/mill/climate.py index 8f880c74c6e..d904538451c 100644 --- a/homeassistant/components/mill/climate.py +++ b/homeassistant/components/mill/climate.py @@ -6,6 +6,8 @@ import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice from homeassistant.components.climate.const import ( + CURRENT_HVAC_HEAT, + CURRENT_HVAC_IDLE, FAN_ON, HVAC_MODE_HEAT, HVAC_MODE_OFF, @@ -167,13 +169,20 @@ class MillHeater(ClimateDevice): """Return the maximum temperature.""" return MAX_TEMP + @property + def hvac_action(self): + """Return current hvac i.e. heat, cool, idle.""" + if self._heater.is_gen1 or self._heater.is_heating == 1: + return CURRENT_HVAC_HEAT + return CURRENT_HVAC_IDLE + @property def hvac_mode(self) -> str: """Return hvac operation ie. heat, cool mode. Need to be one of HVAC_MODE_*. """ - if self._heater.is_gen1 or self._heater.is_heating == 1: + if self._heater.is_gen1 or self._heater.power_status == 1: return HVAC_MODE_HEAT return HVAC_MODE_OFF