thlucas1 / homeassistantcomponent_soundtouchplus

Home Assistant integration for Bose SoundTouch speakers
MIT License
13 stars 1 forks source link

Return capital letters to media_title #22

Closed GunterAv closed 3 weeks ago

GunterAv commented 3 weeks ago

Checklist

Is your feature request related to a problem? Please describe.

...

Describe the solution you'd like

Hello,

I have a request. Is it possible to format the media_title always the same?

I have several Soundtouch devices unfortunately the media_title is returned differently per device. If devices are grouped, the formatting of the media_title may also change.

Sample: media_title: BAYERN 3 or media_title: Bayern 3

Gross

klein

Is it possible that all letters are returned as capital letters to media_title?

Thank you and best regards Gunter

Describe alternatives you've considered

...

Additional context

...

thlucas1 commented 3 weeks ago

It would be the responsibility of the HA media player lovelace UI card to handle formatting issues like these, as the HA media player entity (e.g. soundtouchplus) simply passes what the Bose webservices API provides from the content issuer (e.g. Spotify, Pandora, SiriusXM, etc).

With that said, let me check a few things and see what it would take.

GunterAv commented 3 weeks ago

Hello,

Thank you for your time.

I read the attribute media_title and switch a button on or off, but if the text changes, the button is not switched on.

1 p2

Best regards Gunter

thlucas1 commented 3 weeks ago

Hi Gunter - I don't think I can do this, as it exposes security vulnerabilities in the integration. By allowing a user to build a format string, it would allow malicious actors (not you, of course) to gain access to variables within HA that they should not be able to access outside of the code.

I'm sorry, but I must refer to my original statement of: It would be the responsibility of the HA media player lovelace UI card to handle formatting issues like these.

GunterAv commented 3 weeks ago

Hello,

Thanks for your feedback.

Best regards Gunter