DurgNomis-drol / ha_toyota

Toyota Connected Services integration for Home Assistant.
MIT License
148 stars 32 forks source link

Ignore location updates when reporting 999.0,999.0 #176

Closed skgsergio closed 10 months ago

skgsergio commented 1 year ago

Is your feature request related to a problem? Please describe. Under some circumstances, the lat/long is reported as 999.0,999.0 which results in the following track in Home Assistant's Map Card:

image

Toyota's app says that when it is running the location is unavailable and doesn't show it so I guess that is when it is reporting that bogus lat/lng.

Describe the solution you'd like If the location is 999.0,999.0 the sensor shouldn't be updated, or in any case update it as "unknown".

Describe alternatives you've considered N/A.

Additional context

Using directly the mytoyota python lib this is the content of the vehicle._status:

(mytoyota) sconde@setebos ~/tmp $ python toyota.py 
vehicle._status = {'event': {'lat': '999.0', 'lon': '999.0', 'timestamp': '1700479097000'}, 'tripStatus': '0'}
CM000n commented 10 months ago

We recently released version 2.0.0 of the Custom Component with major changes and support for the new Mytoyota API. As we unfortunately cannot provide support for Custom Component versions < v2.0.0, I hereby close your issue. If the issue still applies to the current version, you are of course free to open a new issue. 😊