Add radiotherm is_on method to return on/off (#20283)

* Added state method to return current operating state to fix #18244 for radiotherm component.

* Changed to set the is_on property when actively heating or cooling.
This commit is contained in:
Ted Drain 2019-01-21 12:05:42 -08:00 committed by Rohan Kapoor
parent bb21cb6c89
commit 4b3cdb9f4e

View file

@ -219,6 +219,11 @@ class RadioThermostat(ClimateDevice):
"""Return true if away mode is on."""
return self._away
@property
def is_on(self):
"""Return true if on."""
return self._tstate != STATE_IDLE
def update(self):
"""Update and validate the data from the thermostat."""
# Radio thermostats are very slow, and sometimes don't respond