Fix issues with generic thermostat#11805
Merged
MartinHjelmare merged 2 commits intoJan 22, 2018
Merged
Conversation
2 tasks
MartinHjelmare
requested changes
Jan 20, 2018
Member
MartinHjelmare
left a comment
There was a problem hiding this comment.
Looks good! Some minor comments below.
| self._target_temp = self.min_temp | ||
| _LOGGER.warning('Undefined target temperature, \ | ||
| falling back to %s', self._target_temp) | ||
| _LOGGER.warning('Undefined target temperature,' |
Member
There was a problem hiding this comment.
Please use double quotes for log messages.
| self._is_away = True if str( | ||
| old_state.attributes[ATTR_AWAY_MODE]) == STATE_ON else False | ||
| if old_state.attributes[ATTR_AWAY_MODE] is not None: | ||
| self._is_away = True if str( |
Member
There was a problem hiding this comment.
self._is_away = str(
old_state.attributes[ATTR_AWAY_MODE]) == STATE_ON| if self._initial_operation_mode is None: | ||
| if old_state.attributes[ATTR_OPERATION_MODE] == STATE_OFF: | ||
| self._enabled = False | ||
| if old_state.attributes[ATTR_OPERATION_MODE] is not None: |
Member
There was a problem hiding this comment.
Join this with the statement on the previous line using AND.
| self._active = True | ||
| _LOGGER.info('Obtained current and target temperature. ' | ||
| 'Generic thermostat active.') | ||
| 'Generic thermostat active. %s, %s', |
Member
There was a problem hiding this comment.
Please use double quotes.
houndci-bot
reviewed
Jan 22, 2018
There was a problem hiding this comment.
visually indented line with same indent as next logical line
Contributor
Author
|
@MartinHjelmare updates changes. With your help I also found a useless if that was covered by the next one, so I removed it as well. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Related issue (if applicable):
fixes #11757, fixes #11798, fixes #11763
Pull request in home-assistant.github.io with documentation (if applicable):
home-assistant/home-assistant.io#4462
Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code does not interact with devices:
toxrun successfully. Your PR cannot be merged unless tests pass