Skip to content
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

All entities have lost name_ prefix #1059

Open
2 tasks done
ddaddy opened this issue Oct 27, 2024 · 1 comment
Open
2 tasks done

All entities have lost name_ prefix #1059

ddaddy opened this issue Oct 27, 2024 · 1 comment
Labels
car For items that relate to Tesla vehicles triage New issues raised that need initial attention

Comments

@ddaddy
Copy link
Contributor

ddaddy commented Oct 27, 2024

Is there an existing issue for this?

  • I have searched both the existing open issues & recently closed issues and did not find a duplicate of this issue.

I have read about the Fleet API and understand I may need to use it

  • I understand issues relating to read only commands will be auto closed if not using the Fleet API.

Version of the Tesla component

3.24.1

Version of the Tesla car software

2024.26.8

Model

Model S

Current Behavior

Firstly, I am not using the Fleet API as my 2017 Model S has never been updated to use it. The old API is working perfectly fine.

Today I had some errors that my token had expired, so I deleted the integration and re-added it with a new auth token.
Everything seems to work fine, except now all my entities have lost their name_ prefix.

I can't see a code commit that would have changed this so it must be a bug.

I have looked at the logs and display_name is empty although the Tesla app correctly displays the name of the car.
There is another parameter vehicle_name which does have the name of the car. I don't know if this was always here, or whether Tesla just decided to change it (although it's odd they kept the old parameter too).

Anyway, I'm wondering if during initialisation it worth checking if display_name is empty and then using vehicle_name instead?

Expected Behavior

All my entities should be named name_*

Debug logs

2024-10-27 10:49:25.206 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":[{"id":xxxxxxx,"user_id":259777,"vehicle_id":xxxxxxx,"vin":"xxxxxxx","color":null,"access_type":"OWNER","display_name":"","option_codes":null,"cached_data":null,"mobile_access_disabled":false,"granular_access":{"hide_private":false},"tokens":null,"state":"online","in_service":false,"id_s":"xxxxxxx","calendar_enabled":true,"api_version":36,"backseat_token":null,"backseat_token_updated_at":null,"ble_autopair_enrolled":false,"command_signing":"off"}],"count":1}

Anything else?

Looking again at the logs, the empty display_name is part of the products API but the vehicle_name is part of the actual polling data, so I don't know if this is available during setup?

@ddaddy ddaddy added car For items that relate to Tesla vehicles triage New issues raised that need initial attention labels Oct 27, 2024
@ddaddy
Copy link
Contributor Author

ddaddy commented Oct 27, 2024

I've created a partial fix with PR #1060
Although it still doesn't bring back my old entity names, it does go some way to prevent any collisions if this occurs with multiple vehicles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
car For items that relate to Tesla vehicles triage New issues raised that need initial attention
Projects
None yet
Development

No branches or pull requests

1 participant