Merged
Conversation
| if value == comp_value: | ||
| return key | ||
| return STATE_UNKNOWN | ||
| return None |
Member
There was a problem hiding this comment.
The changed function here creates state attributes, so this will be a breaking change. State attributes are not parsed, the way state is parsed, converting None to STATE_UNKNOWN in the base entity class.
| for state in self._data.status[KEY_STATUS].split()) | ||
| except KeyError: | ||
| return STATE_UNKNOWN | ||
| return None |
Member
There was a problem hiding this comment.
This function also populates state attributes, so will be a breaking change.
| """Update state data from Xbox API.""" | ||
| presence = self._api.get_user_presence(self._xuid) | ||
| self._state = presence.get('state', STATE_UNKNOWN) | ||
| self._state = presence.get('state', None) |
Member
There was a problem hiding this comment.
If it's a dictionary the default returned value is None when the key is missing.
| if match: | ||
| return match.group(1) | ||
| return STATE_UNKNOWN | ||
| return None |
Member
There was a problem hiding this comment.
This method is also used to populate state attributes, so this will be a breaking change.
| if standby_state == WEMO_STANDBY: | ||
| return STATE_STANDBY | ||
| return STATE_UNKNOWN | ||
| return None |
added 3 commits
January 23, 2019 16:37
balloob
approved these changes
Jan 24, 2019
Merged
3 tasks
alandtse
pushed a commit
to alandtse/home-assistant
that referenced
this pull request
Feb 12, 2019
* Change STATE_UNKOWN to None * Change STATE_UNKOWN to None * tests * tests * tests * tests * tests * style * fix comments * fix comments * update fan test
kellerza
pushed a commit
to kellerza/ha-core
that referenced
this pull request
Feb 24, 2019
* Change STATE_UNKOWN to None * Change STATE_UNKOWN to None * tests * tests * tests * tests * tests * style * fix comments * fix comments * update fan test
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Change STATE_UNKOWN to None
Checklist:
tox. Your PR cannot be merged unless tests passIf the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable ([example][ex-requir]).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.