core icon indicating copy to clipboard operation
core copied to clipboard

Tessi - Media player not updated

Open raffoul opened this issue 8 months ago • 8 comments

The problem

Hello, The update of the media player doesnt work.

The status stays inactive as you can see on the following picture : Image

Thank you for your help

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

tessie

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet


Anything in the logs that might be useful for us?

No logs/exceptions about this issue.

Additional information

No response

raffoul avatar Mar 25 '25 10:03 raffoul

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

Code owner commands

Code owners of tessie 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 tessie 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)


tessie documentation tessie source (message by IssueLinks)

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

Did this use to work, or has it just never worked?

@stx do you populate the media fields using Fleet Telemetry into vehicle_data?

Bre77 avatar Mar 25 '25 11:03 Bre77

Never worked. Am I alone ?

raffoul avatar Mar 27 '25 06:03 raffoul

@Bre77 Possible it worked on the old Fleet API data. Not currently populating these fields into vehicle_data but may be added in the future.

stx avatar Apr 06 '25 01:04 stx

@Bre77 Possible it worked on the old Fleet API data. Not currently populating these fields into vehicle_data but may be added in the future.

@stx That would be why this has stopped working. I think long term I need to transition this entire integration to use your websocket, similar to how Teslemetry uses SSE for everything now. That will be a bunch of work though.

@raffoul This use to work before Tessie had to make some major changes due to the Tesla Fleet API pricing. It may start working in the future.

Bre77 avatar Apr 06 '25 01:04 Bre77

I can confirm this worked some months ago. @jlpouffier also had automations with this media player entity. Should the media player be removed if Tessie can not provide data for it?

piitaya avatar May 04 '25 16:05 piitaya

Yeah I do have two automations waiting for the player to be working again. Honestly I would vote to remove it if we're unsure what the future looks like. We can always add it back later

jlpouffier avatar May 04 '25 17:05 jlpouffier

@stx what do you think, should we remove media player stuff from Home Assistant since its not supported on your side?

Bre77 avatar May 04 '25 23:05 Bre77

@Bre77 This is now supported on firmware 2025.2.6+ (Pro account needed)

stx avatar May 06 '25 20:05 stx

I'm on the Po version and 2025.8.7. Still stuck at idle on my side

jlpouffier avatar May 07 '25 17:05 jlpouffier

@jlpouffier This takes awhile to roll out globally. If you're still missing media data, please email [email protected] with your VIN. Thanks!

stx avatar May 07 '25 20:05 stx

Tl;dr : It works on my side now too!

Longer story: I have an automations that is patiently waiting for this fix since ages. The automation transfers what I'm listening from my car to my living room using Music Assistant.

The thing is I changed my speakers set up a few weeks ago and did not take the time to edit that automation to adapt it a bit (especially the default volume level 🤣)

So this morning my automation surprised me by transferring what I was listening to... and almost deafening me in the process 🤣

That was a fun moment.

jlpouffier avatar May 08 '25 07:05 jlpouffier

I'm on the legacy subscription and 2025.14.3.1 firmware and the media player still stay idle. Weird 😅

piitaya avatar May 08 '25 09:05 piitaya

I'm seeing this in the logs for Tessie and media player:

Logger: homeassistant
Source: components/tessie/media_player.py:60
First occurred: 00:32:28 (11694 occurrences)
Last logged: 16:50:32

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 479, in _async_refresh
    self.async_update_listeners()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_update_listeners
    update_callback()
    ~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/components/tessie/entity.py", line 59, in _handle_coordinator_update
    super()._handle_coordinator_update()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 559, in _handle_coordinator_update
    self.async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1019, in async_write_ha_state
    self._async_write_ha_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1141, in _async_write_ha_state
    self.__async_calculate_state()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1083, in __async_calculate_state
    if state_attributes := self.state_attributes:
                           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1165, in state_attributes
    if (value := getattr(self, attr)) is not None:
                 ~~~~~~~^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tessie/media_player.py", line 60, in volume_level
    return self.get("vehicle_state_media_info_audio_volume", 0) / self.get(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
        "vehicle_state_media_info_audio_volume_max", 10.333333
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    )
    ~
ZeroDivisionError: division by zero

djbadders avatar May 28 '25 15:05 djbadders

That division by zero I can fix.

Bre77 avatar May 28 '25 22:05 Bre77

am also seeing this in the logs while debugging another unrelated integration

ZeroDivisionError: division by zero 2025-05-29 13:46:01.136 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 479, in _async_refresh self.async_update_listeners() ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_update_listeners update_callback() ~~~~~~~~~~~~~~~^^ File "/usr/src/homeassistant/homeassistant/components/tessie/entity.py", line 59, in _handle_coordinator_update super()._handle_coordinator_update() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 559, in _handle_coordinator_update self.async_write_ha_state() ~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1019, in async_write_ha_state self._async_write_ha_state() ~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1141, in _async_write_ha_state self.__async_calculate_state() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1083, in __async_calculate_state if state_attributes := self.state_attributes: ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1165, in state_attributes if (value := getattr(self, attr)) is not None: ~~~~~~~^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/tessie/media_player.py", line 60, in volume_level return self.get("vehicle_state_media_info_audio_volume", 0) / self.get( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ "vehicle_state_media_info_audio_volume_max", 10.333333 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) ~ ZeroDivisionError: division by zero

mlduncombe avatar May 29 '25 12:05 mlduncombe

The division by zero has already been fixed in another issue & PR

Bre77 avatar May 29 '25 14:05 Bre77

Ok but not released yet...

djbadders avatar May 29 '25 14:05 djbadders

Ok but not released yet...

Correct, should be in 2025.6.0

Bre77 avatar May 29 '25 21:05 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.