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

Tesla Fleet: Unable to set state of seat heaters #134365

Open
dr-carrot opened this issue Dec 31, 2024 · 4 comments · Fixed by Teslemetry/python-tesla-fleet-api#10
Open

Tesla Fleet: Unable to set state of seat heaters #134365

dr-carrot opened this issue Dec 31, 2024 · 4 comments · Fixed by Teslemetry/python-tesla-fleet-api#10

Comments

@dr-carrot
Copy link

dr-carrot commented Dec 31, 2024

The problem

When attempting to change the level of any seat heater, I get the following error and the seat heater level does not change: Failed to perform the action select/select_option. Assignment not allowed to message field "CAR_SEAT_FRONT_RIGHT" in protocol message object.

What version of Home Assistant Core has the issue?

core-2024.12.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Tesla Fleet

Link to integration documentation on our website

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

Diagnostics information

config_entry-tesla_fleet-01JEWAAFX56P4JTYGSN9043CZA.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:245
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 2:54:59 PM (1 occurrences)
Last logged: 2:54:59 PM

[139878588038688] 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 2802, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, 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/select/__init__.py", line 188, in async_handle_select_option
    await self.async_select_option(option)
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/select.py", line 153, in async_select_option
    await handle_vehicle_command(
        self.api.remote_seat_heater_request(self.entity_description.position, level)
    )
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 52, in handle_vehicle_command
    result = await handle_command(command)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tesla_fleet/helpers.py", line 39, in handle_command
    result = await command
             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/tesla_fleet_api/vehiclesigned.py", line 608, in remote_seat_heater_request
    heater_action.CAR_SEAT_FRONT_LEFT = Void()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: Assignment not allowed to message field "CAR_SEAT_FRONT_LEFT" in protocol message object.

Additional information

No response

@home-assistant
Copy link

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)

@dr-carrot
Copy link
Author

I'm not super familiar with python, but it kind of seem the issue is occurring with protobuf here.

@Bre77
Copy link
Contributor

Bre77 commented Dec 31, 2024

Seat heaters are always annoying. I fully expect this is an issue with the library, and you are probably right about the protobuf as I havent updated it in a bit.

@dr-carrot
Copy link
Author

dr-carrot commented Dec 31, 2024

I couldn't resist digging deeper. It seems to me like it's a mutability issue with protobuf. I got it to work by hard coding in the package:

heater_action = HvacSeatHeaterActions.HvacSeatHeaterAction(CAR_SEAT_FRONT_LEFT=Void(),SEAT_HEATER_HIGH=Void())
       seat_position=-1
       seat_heater_level=-1```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants