You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the tesla_custom custom component in Home Assistant and have been wondering why the location of our car is often reported as away or unknown by the device_tracker entity in HA if the car is parked in our garage.
It just so happens that our garage is facing almost perfectly north, which means that often the Tesla API will return a heading value of 0, which of course evaluates to false and makes the get_location() not update the value or return an empty dict.
The text was updated successfully, but these errors were encountered:
itssimon
changed the title
get_location() returns null if car is parked facing northget_location() returns null if car is parked facing north
Jan 18, 2022
itssimon
changed the title
get_location() returns null if car is parked facing northget_location() not updating if car is parked facing north
Jan 18, 2022
Test for changes to location were based on non-0 values which would fail if any value was 0 (such as heading north). Fix correctly treats 0 as a valid value.
closes#276
I'm using the
tesla_custom
custom component in Home Assistant and have been wondering why the location of our car is often reported as away or unknown by thedevice_tracker
entity in HA if the car is parked in our garage.I found the culprit in this line of code:
teslajsonpy/teslajsonpy/homeassistant/gps.py
Line 51 in bd67913
It just so happens that our garage is facing almost perfectly north, which means that often the Tesla API will return a
heading
value of0
, which of course evaluates tofalse
and makes theget_location()
not update the value or return an empty dict.The text was updated successfully, but these errors were encountered: