Skip to content

Commit

Permalink
Merge pull request #12 from tubededentifrice/fix-8
Browse files Browse the repository at this point in the history
Fix issue 8 (AttributeError: 'str' object has no attribute 'state')
  • Loading branch information
MapoDan authored Jan 18, 2020
2 parents 0650fc2 + 387ec3c commit d1d8207
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/programmable_thermostat/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

_LOGGER = logging.getLogger(__name__)

__version__ = '4.2'
__version__ = '4.3'

DEPENDENCIES = ['switch', 'sensor']

Expand Down Expand Up @@ -405,7 +405,7 @@ def _async_restore_program_temp(self):
def _async_update_program_temp(self, state):
"""Update thermostat with latest state from sensor."""
try:
self._target_temp = float(state.state)
self._target_temp = float(state)
except ValueError as ex:
_LOGGER.error("Unable to update from sensor: %s", ex)

Expand Down

0 comments on commit d1d8207

Please sign in to comment.