Tesla HACS integration - not able to wake up car

Hi all,

I’m having issues with allowing HA to wake my Tesla from sleep mode to enable automations to run. I’ve tried a number of things such as “Force wake”, “Unlock car” and “Turn on HVAC” which all according to the documentation should wake the car up. However, none of them work. I’ve provided a debug report below from when I tried the “Force wake” button in HA (which doesn’t work either):

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/tesla_custom/button.py:67
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 18:31:58 (2 occurrences)
Last logged: 18:32:46

[139929301229504]
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 227, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1969, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2006, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
    response_data = await _handle_entity_call(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 124, in _async_press_action
    await self.async_press()
  File "/config/custom_components/tesla_custom/button.py", line 67, in async_press
    await self._car.wake_up()
  File "/usr/local/lib/python3.11/site-packages/teslajsonpy/car.py", line 1130, in wake_up
    await self._controller.wake_up(car_id=self.id)
  File "/usr/local/lib/python3.11/site-packages/teslajsonpy/controller.py", line 491, in wake_up
    response = await self.get_vehicle_summary(vin=car_vin)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/teslajsonpy/controller.py", line 331, in get_vehicle_summary
    await self.api(
  File "/usr/local/lib/python3.11/site-packages/teslajsonpy/controller.py", line 1348, in api
    return await self.__post_with_retries_except_unavailable(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 47, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/tenacity/__init__.py", line 314, in iter
    return fut.result()
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 50, in __call__
    result = await fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/teslajsonpy/controller.py", line 1380, in __post_with_retries_except_unavailable
    return await self.__connection.post(command, method=method, data=data, url=url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/teslajsonpy/connection.py", line 162, in post
    return await self.__open(url, method=method, headers=self.head, data=data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/teslajsonpy/connection.py", line 213, in __open
    raise TeslaException(resp.status_code)
teslajsonpy.exceptions.TeslaException

Anyone got any ideas on how to get this to work?

1 Like

Have not experienced the same yet, but I just did an automation to press the wake up button when it’s allowed to charge - just to be sure:

alias: Vakna Tesla!
description: Dags att ladda.
trigger:
  - platform: time
    at: "22:00:00"
condition: []
action:
  - device_id: 8fXXXXXXXXXXXXXXX
    domain: button
    entity_id: 24XXXXXXXXXXXXXXX
    type: press
  - delay:
      hours: 3
      minutes: 0
      seconds: 0
      milliseconds: 0
  - device_id: 8fXXXXXXXXXXXXXXX
    domain: button
    entity_id: 24XXXXXXXXXXXXXXX
    type: press
mode: single
1 Like

Did you ever resolve this? I’m getting this too. Tried rebooting, refreshing the token, re-configuring the integration, not sure how to resolve. I’m unable to send any commands to the car.