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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Tile location accuracy bug #37233
Conversation
Confirmed error
|
@@ -84,6 +84,16 @@ def location_accuracy(self): | |||
|
|||
Value in meters. | |||
""" | |||
if self._tile["last_tile_state"].get("h_accuracy") and not self._tile[ |
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.
Could you extract the variables first before checking. This is pretty unreadable.
Retested with this code as a custom_components, and the error persists
|
That's my cleanup 馃檮 It looks like key exists but it has |
Thanks for the help, @balloob. 馃憤 |
Error is gone after pulling latest sha |
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Proposed change
This PR fixes a bug where a missing Tile H or V accuracy parameter could throw an unhandled exception.
Type of change
Example entry for
configuration.yaml
:# Example 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: