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

fix: mediaplayer attribute error #68

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

Gh0stExp10it
Copy link
Contributor

Fix regarding the issues with the MediaPlayer AttributeError: #67

image


Copied text from Issue:

I have analysed the problem a little more. It definitely has something to do with the plugin for controlling Samsung Smart TVs. Unfortunately, this third-party plugin keeps clearing the current playback status. Thus the source_list is not equal to the current_source. Here is an excerpt from the log, which I have expanded a little.

Source List from my Configuration

19:26:05 ERROR (homeassistant.py): Attributes: {'source_list': ['TV', 'Unbekannt (HDMI 1)', 'Unbekannt (HDMI 2)', 'Unbekannt (HDMI 3)', 'ARD-Mediathek', 'ARTE', 'Amazon Prime', 'Joyn', 'Netflix', 'Plex', 'Spotify', 'YouTube', 'ZDF-Mediathek', '01| ARD', '02| ZDF', '03| RTL', '04| Sat.1', '05| ProSieben', '06| RTL ZWEI', '07| Kabel Eins', '08| VOX', '09| SUPER RTL', '10| ProSieben MAXX', '11| DMAX'] [...]

Actual Source, which falls back to the app_id

19:26:05 ERROR (homeassistant.py): Attributes: {[...] 'media_title': 'Das Erste HD', 'app_id': 'TV/HDMI', 'source': 'TV/HDMI', [...]

The source list does not contain any attribute that refers to the actual source == TV/HDMI
The error therefore only affects the control of the radiobox-marked icon and text Currently selected Source. As a simple fix, I would suggest an additional check using the source_list list. I will create a PR, then the original author can check this again.

@Garulf
Copy link
Owner

Garulf commented Jan 9, 2025

Thank you for fixing this.

@Garulf Garulf merged commit 7908d35 into Garulf:main Jan 9, 2025
0 of 2 checks passed
@Gh0stExp10it Gh0stExp10it deleted the fix/mediaplayer-attribute-error branch January 9, 2025 15:01
This was referenced Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants