Remove friendly_name attribute from twitch sensor#32067
Merged
MartinHjelmare merged 4 commits intoFeb 25, 2020
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #32067 +/- ##
==========================================
+ Coverage 94.71% 94.73% +0.01%
==========================================
Files 766 767 +1
Lines 55568 55504 -64
==========================================
- Hits 52630 52579 -51
+ Misses 2938 2925 -13
Continue to review full report at Codecov.
|
balloob
reviewed
Feb 23, 2020
| ATTR_FRIENDLY_NAME: self._channel.display_name, | ||
| } | ||
| attr.update(self._statistics) | ||
| attr = self._statistics |
Member
There was a problem hiding this comment.
Careful here, I haven't seen the rest of the code but you're now mutating self._statistics instead of a copy. So now if the state is no longer streaming, the game/title attributes might still be present.
Member
Author
There was a problem hiding this comment.
You are correct, read up on it and now use copy.deepcopy().
balloob
reviewed
Feb 24, 2020
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
springstan
commented
Feb 24, 2020
MartinHjelmare
approved these changes
Feb 25, 2020
Member
|
Thanks! |
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.
Breaking change
Remove unnecessary friendly_name attribute as requested in #31122 (comment)
Proposed change
Type of change
Example entry for
configuration.yaml:Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale: