-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Improve Vizio fix to avoid KeyError #32163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #32163 +/- ##
==========================================
- Coverage 94.74% 94.73% -0.01%
==========================================
Files 768 768
Lines 55629 55619 -10
==========================================
- Hits 52703 52693 -10
Misses 2926 2926
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
* dont set default volume_step on import check * ensure config entry data['volume_step'] is set * consolidate entry update during entry setup
Proposed change
In #32151 I fixed a bug that occurred when the config entry data dictionary did not have
volume_step. @MartinHjelmare identified that the change I made was redundant in that I was falling back to the DEFAULT_VOLUME_STEP when checking the config, but that is unnecessary because config validation already guarantees that thevolume_stepparameter is in the config dictionary, so this change fixes that. As part of looking into this, I also realized that I did not setvolume_stepin the data dictionary on initialization, which means that the second import (e.g. on a restart) would always set it. I have updated the logic to always ensure it is included in the config entry data.This should go out with 0.106 along with the other linked PR
Type of change
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: