-
Notifications
You must be signed in to change notification settings - Fork 101
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
Destination of Navigation #384
Comments
+1, this would be great for "heading home" automations. I'll take a look to see if the data is available tonight |
I haven't seen anything in the API response that points to a destination, arrival time, etc. Unfortunate because that would be super cool. I was imagining a location_tracker that could use the setup zones to know if you were going home or to work. Then a sensor to estimate when you would get there. Side note: There is the proximity sensor for heading home automatons The one possibility is sharing an address to start navigation. I'm not sure what best implementation would be for that. This is possible through the custom api call service. |
I suspect that data is only in the websockets payload, but it is available to the app somehow. It looks like the websockets feature is currently broken in teslajsonpy, but it also looks like there is now an httpx-ws library we might be able to switch to if needed. I didn't have time last night to get very far with this, but will try to get a capture of some ws data to see if nav destination is available there or not, to inform if it's worth fixing websockets support. |
Oh wow, I was not expecting any traction on this, so to see someone else who likes the idea is great :) If I get any time I am happy to do my own digging as well, but relies on a few things:
Fingers crossed for Sunday to have some time |
I messed around trying to get websockets working again, but it's requiring some large rewrites of the old websocket logic to use the new httpx_ws library, and I ran out of time today. I think it'll be easier to try to create a small stand-alone script to test the websocket connection and see if the nav info is available there. I did confirm with the app again that it does reflect the nav destination and eta, so I still have some hope. |
Just noticed these fields in drive_state.
Some are not available when parked, but it looks to be everything we would need. |
Nice! I even meant to check the api data to see if it was there only when in Drive, and I totally forgot to do so. |
In the draft PR I have a location tracker for the destination, a distance to destination sensor, and an arrival time sensor. The arrival time sensor has extra attributes with the energy at arrival, traffic minutes delay, and the destination name/string. Naming convention:
Let me know if those attributes deserve their own HA sensors and if there are better entity names than what I came up with. |
Oh wow, you guys are amazing. I believe this provides what is needed for my usecase :) Looking forward to seeing the PRs track through |
Is your feature request related to a problem? Please describe.
I don't know if this is possible from the API or not, but would be great to get access to some / all of the following:
Destination set within the Tesla
Time to destination
I have to automation ideas if these can be exposed e.g. if destination eq home, the time remaining is < 30 minutes and the house is below X then activate the heating (set house occupancy as occupied).
Or - if destination equal friends house, message them when time to house is 10 minutes out.
Describe the solution you'd like
Ideally the API contains these and can be exposed via the Tesla intergration.
Describe alternatives you've considered
N/A
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: