Skip to content

Commit

Permalink
Add 'off' functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mww012 committed Jun 22, 2021
1 parent 544e1bf commit 3985333
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions custom_components/infinitive/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@

import homeassistant.helpers.config_validation as cv
from homeassistant.const import (
CONF_FILENAME,
CONF_HOST,
CONF_PORT,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
ATTR_FRIENDLY_NAME,
)
Expand All @@ -28,12 +26,8 @@
)

from homeassistant.components.climate.const import (
ATTR_CURRENT_TEMPERATURE,
ATTR_CURRENT_HUMIDITY,
ATTR_FAN_MODE,
ATTR_FAN_MODES,
ATTR_HVAC_MODE,
ATTR_HVAC_MODES,
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
HVAC_MODES,
Expand Down Expand Up @@ -261,11 +255,13 @@ def hvac_mode(self):
return HVAC_MODES[1]
elif self._status["mode"] == "auto":
return HVAC_MODES[3]
else:
return HVAC_MODES[0]

@property
def hvac_modes(self):
"""Return supported HVAC modes (heat, cool, heat_cool)."""
return [HVAC_MODES[1], HVAC_MODES[2], HVAC_MODES[3]]
"""Return supported HVAC modes (off, heat, cool, heat_cool)."""
return [HVAC_MODES[0], HVAC_MODES[1], HVAC_MODES[2], HVAC_MODES[3]]

@property
def hvac_action(self):
Expand Down

0 comments on commit 3985333

Please sign in to comment.