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

Unable to set heated seats #957

Open BlackBeltMike opened 2 months ago

BlackBeltMike 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

2024.8.9

Model

Model 3

Current Behavior

Hi,

Thank you so much for this integration! I've had some fun over the past few days setting up nginx proxy manager, the tesla proxy and custom component into my pre-existing Home Assistant but I finally have things working inside Home Assistant where I can now successfully set the Charge Limit of the car, and the value I set there is reflected both inside the Tesla app and inside the vehicle itself. I can also use Home Assistant to turn on/off the cabin climate system so as far as I can tell, commands are working with the Fleet API. Thanks so much for the documentation!

What isn't working for me is setting the heated seat values. For this I see an unknown error reported by HA a few moments after attempting to set the control. I've pasted in the debug logs where I demonstrate that setting a charge limit is working, but a following command to set the heated seat fails... the response hints that the API is missing the seat_position parameter. Is that an expected result or did I mess something up?

Thank you. Mike.

Expected Behavior

Controls to function without error.

Debug logs

2024-04-30 15:43:22.121 DEBUG (MainThread) [teslajsonpy.car] Sending command: CHANGE_CHARGE_LIMIT
2024-04-30 15:43:22.122 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 4:28:23
2024-04-30 15:43:22.123 DEBUG (MainThread) [teslajsonpy.connection] post: https://c03d64a7-tesla-http-proxy/api/1/vehicles/[VIN NUMBER REDACTED]/command/set_charge_limit {'percent': 80}
2024-04-30 15:43:22.409 DEBUG (MainThread) [teslajsonpy.connection] 200: {"response":{"result":true,"reason":""}}

2024-04-30 15:43:22.409 DEBUG (MainThread) [teslajsonpy.car] Response from command CHANGE_CHARGE_LIMIT: {'response': {'result': True, 'reason': ''}}
2024-04-30 15:43:31.135 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 15:43:31.135 DEBUG (MainThread) [teslajsonpy.controller] Get vehicles. Force: False Time: 40 Interval 60
2024-04-30 15:43:31.136 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 15:43:31.164 DEBUG (MainThread) [custom_components.tesla_custom] Running controller.update()
2024-04-30 15:43:31.164 DEBUG (MainThread) [teslajsonpy.controller] Get vehicles. Force: False Time: 40 Interval 60
2024-04-30 15:43:31.164 DEBUG (MainThread) [teslajsonpy.controller] 41557: online. Polling policy: normal. Update state: normal. Since last park: 11374. Since last wake up: 12705. Idle interval: 600. shift_state: None sentry: True climate: False, charging: Stopped 
2024-04-30 15:43:31.164 DEBUG (MainThread) [teslajsonpy.controller] 41557: Skipping update with state online. Polling: True. Last update: 69 ago. Last parked: 11374 ago. Last wake up 12705 ago. 
2024-04-30 15:43:31.164 DEBUG (MainThread) [custom_components.tesla_custom] Finished fetching tesla_custom data in 0.001 seconds (success: True)
2024-04-30 15:43:34.586 DEBUG (MainThread) [teslajsonpy.car] Sending command: REMOTE_AUTO_SEAT_CLIMATE_REQUEST
2024-04-30 15:43:34.586 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in 4:28:11
2024-04-30 15:43:34.588 DEBUG (MainThread) [teslajsonpy.connection] post: https://c03d64a7-tesla-http-proxy/api/1/vehicles/[VIN NUMBER REDACTED]/command/remote_auto_seat_climate_request {'auto_seat_position': 2, 'auto_climate_on': False}
2024-04-30 15:43:34.628 DEBUG (MainThread) [teslajsonpy.connection] 400: {"response":{"result":false,"string":"missing seat_position param"},"error":"","error_description":""}

Anything else?

No response

HiFuGa commented 1 month ago

Hi, Just for information, I installed recently HA and all add-ons for the tesla integration, and I have the same problem.

Most of commands are working, few informations takes time to be refreshed (as the shift state or the parking brake), but it works.

But for the heating of the seats, I have as well an error when I select a command in the list.

Thanks you !

dandelionclock commented 1 month ago

I am getting unknown errors. When I try to change seat heater in teslemetry, it says request body not invalid. Tesla's fleet api documentation didn't even have the parameters listed. I wonder if Tesla broke it

  --header "Authorization: Bearer $TESLA_API_TOKEN" \
  --data '{}' \
  'https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/vehicles/{vehicle_tag}/command/remote_seat_heater_request'