core icon indicating copy to clipboard operation
core copied to clipboard

Tesla Fleet: 'Auto Seat Climate Left' switch not working

Open thomastunc opened this issue 9 months ago • 4 comments

The problem

When using the Tesla Fleet integration to control my car, I noticed the problem of being unable to turn on/off the switch.auto_seat_climate_left. When I press it, I will receive the error "Command was unsuccessful: invalid seat"

However, when I toggle the switch.auto_seat_climate_right then the left one gets activated. This issue is related to an index error and has also been mentioned in this issue, which is the library that is used for this integration: https://github.com/Teslemetry/python-tesla-fleet-api/issues/11

What version of Home Assistant Core has the issue?

core-2025.3.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Tesla Fleet

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tesla_fleet/

Diagnostics information

No response

Example YAML snippet


Anything in the logs that might be useful for us?

2025-03-25 10:28:49.092 DEBUG (MainThread) [homeassistant.components.tesla_fleet] Command result: {'response': {'result': False, 'reason': 'cabin comfort remote settings not enabled'}}
2025-03-25 10:28:49.092 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139731531167296] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2794, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2837, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/switch.py", line 170, in async_turn_off
    await handle_vehicle_command(self.entity_description.off_func(self.api))
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 69, in handle_vehicle_command
    raise HomeAssistantError(
    ...<3 lines>...
    )
homeassistant.exceptions.HomeAssistantError: Command was unsuccessful: cabin comfort remote settings not enabled
2025-03-25 10:29:05.612 DEBUG (MainThread) [homeassistant.components.tesla_fleet] Command result: {'response': {'result': False, 'reason': 'invalid seat'}}
2025-03-25 10:29:05.612 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139731531167296] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2794, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2837, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/switch.py", line 162, in async_turn_on
    await handle_vehicle_command(self.entity_description.on_func(self.api))
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 69, in handle_vehicle_command
    raise HomeAssistantError(
    ...<3 lines>...
    )
homeassistant.exceptions.HomeAssistantError: Command was unsuccessful: invalid seat

Additional information

When the library is updated, we can use the latest version in this integration. However, I am not sure if there have been any breaking changes of the python-tesla-fleet-api library in the meantime.

thomastunc avatar Mar 25 '25 10:03 thomastunc

Hey there @bre77, mind taking a look at this issue as it has been labeled with an integration (tesla_fleet) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tesla_fleet can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tesla_fleet Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tesla_fleet documentation tesla_fleet source (message by IssueLinks)

home-assistant[bot] avatar Mar 25 '25 10:03 home-assistant[bot]

Yeah there is a bug I know about, just need to push the fix into Tesla Fleet and Tessie

Bre77 avatar Mar 25 '25 11:03 Bre77

Have you made the fix already? Otherwise I can also fork the python-tesla-fleet-api repo if you're busy and apply the fix so you'd only have to review it and bump the version here.

thomastunc avatar Mar 25 '25 11:03 thomastunc

I believe the bug is in the Home Assistant side, essentially Tesla starts seat heater positions at 1, but the auto seat heater positions at 0, and I'm using the same constant for both. The fix is just changing them to literal 0 and 1 in Home Assistant

Bre77 avatar Mar 25 '25 20:03 Bre77

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.