alandtse / tesla

Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login.
Apache License 2.0
552 stars 99 forks source link

binary_sensor.xxxxx_user_present sensor user_id number does not change when driver changes #956

Closed anthonykeane closed 2 months ago

anthonykeane commented 2 months ago

Is there an existing issue for this?

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

Version of the Tesla component

v3.21.0

Version of the Tesla car software

v11.1

Model

Model 3

Current Behavior

The binary_sensor.xxxxx_user_present sensor toggles on/off however the Attribute: user_id number does not change when driver changes.

Expected Behavior

The binary_sensor.xxxxx_user_present attribute: user_id should change to a different number when driver changes.

Debug logs

[custom_components.tesla_custom.teslamate] Un-subbing from all MQTT Topics.
2024-04-30 09:00:25.113 INFO (MainThread) [custom_components.tesla_custom.teslamate] Un-subbed from all MQTT Topics.
2024-04-30 09:00:25.113 DEBUG (MainThread) [custom_components.tesla_custom] Connected to the Tesla API
2024-04-30 09:00:25.317 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:00:25.317 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:00:25.348 DEBUG (MainThread) [custom_components.tesla_custom.teslamate] Got car ID. VIN:REDACTED TeslamateID: None
2024-04-30 09:00:34.826 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:00:34.826 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:00:34.981 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:00:34.982 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:00:44.826 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:00:44.826 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.000 seconds (success: True)
2024-04-30 09:00:44.981 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:00:44.982 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:00:54.826 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:00:54.982 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:00:58.767 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:00:58.768 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 3.942 seconds (success: True)
2024-04-30 09:00:58.768 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 3.787 seconds (success: True)
2024-04-30 09:00:58.787 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.019 seconds (success: True)
2024-04-30 09:01:08.826 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:08.826 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:01:08.981 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:08.982 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:01:18.826 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:18.826 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:01:18.982 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:18.983 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:01:28.827 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:28.828 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:01:28.981 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:28.982 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:01:38.827 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:38.827 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:01:38.982 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:38.983 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:01:48.826 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:48.982 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:50.351 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.525 seconds (success: True)
2024-04-30 09:01:50.352 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 1.369 seconds (success: True)
2024-04-30 09:01:59.826 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:59.826 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:01:59.982 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:01:59.983 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:02:09.826 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:02:09.827 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:02:09.981 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:02:09.982 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:02:19.826 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:02:19.826 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:02:19.982 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:02:19.983 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:02:29.828 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 09:02:29.828 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 09:02:29.981 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()

Anything else?

I am not sure if the API actually returns different users, maybe this needs checking first? (Sorry, I don't know how to do that, else I wood :) )

skipishere commented 2 months ago

Duplicate of #798