kalkih / mini-media-player

Minimalistic media card for Home Assistant Lovelace UI
MIT License
1.47k stars 206 forks source link

TTS input field disappeared with last update of Home Assistant (2023.11.0) #785

Closed SDR3078 closed 7 months ago

SDR3078 commented 8 months ago

TTS input field disappeared

image

freirejc commented 8 months ago

Same issue here.

bernikr commented 8 months ago

just referencing a fix in another custom card for the devs: bernikr/lovelace-notify-card#20

TheSimTek commented 8 months ago

same here. tried reinstalling card without success.

a1xs commented 8 months ago

image

Sinitronics commented 8 months ago

There's a pull request in to fix the issue but looks like the project is dead in the water.

786

flyman1664 commented 8 months ago

Seems to be an issue with paper-input being depreciated. But not sure what to change in the js file to make it work again.

Stef42300 commented 8 months ago

same problem

freirejc commented 8 months ago

Seems to be an issue with paper-input being depreciated. But not sure what to change in the js file to make it work again.

I've tried to apply the below change but didn't work.

https://github.com/bernikr/lovelace-notify-card/commit/88761d4d742ce588a05344941278d0cf6026c4d4

sonyboypatrick commented 8 months ago

There's a pull request in to fix the issue but looks like the project is dead in the water. #786

Thanks for the hint. This does the trick!

a1xs commented 8 months ago

I changed the "paper-input" field to "ha-textfield" in the files "/config/www/mini-media-player-bundle.js" and "/config/www/community/mini-media-player/mini-media-player-bundle.js" And everything started working! Thank you! image

Emilef22 commented 8 months ago

Did you change all the 29 paper-input fields?

freirejc commented 8 months ago

Did you change all the 29 paper-input fields?

Good question. I was wondering the same.

a1xs commented 8 months ago

Did you change all the 29 paper-input fields?

Yes, I did.The send button didn’t work, but I didn’t need it

TheSimTek commented 8 months ago

Changed all paper-input fields to ha-textfield but still no tts function. Anyone had success yet?

sonyboypatrick commented 8 months ago

Changed all paper-input fields to ha-textfield but still no tts function. Anyone had success yet?

Just replace all references to paper-input with ha-textfield in the js file and compress the new js file with gzip

TheSimTek commented 8 months ago

Thanks sonyboypatrick but this did not work. Both the js and gz have ha-textfield but there is still no TTS functionality. Perhaps its my code (not my strong point) -

title: Broadcast type: custom:mini-media-player artwork: full-cover entity: media_player.whole_house tts: platform: google enity_id: media_player.whole_house toggle_power: false volume_stateless: false name: Broadcast

sonyboypatrick commented 8 months ago

Have you cleared your cache? For me it took a few minutes to appear. You could double check: https://yourhomeassistanturl/hacsfiles/mini-media-player/mini-media-player-bundle.js if you missed any paper-input

This is my config

type: custom:vertical-stack-in-card cards:

dysphasi commented 8 months ago

As @sonyboypatrick said, if after making the changes to the .js file you aren't seeing the text input boxes still, do make sure to relaod the cache on your frontend.

Once you've done this everything should work just fine without any changes to your card in lovelace.

This is simple in a browser, just follow your usual broswer cache reset procedure.

For the iOS app, it's a bit different: Side bar -> Settings -> Companion App -> Debugging -> Resent frontend cache (you may need to do a 'swipe-down' to reload the page from the Home Aisstant lovelac screen).

In android, again a bit different: go to your android OS settings (the system settings, not in the HA app) -> Apps storage -> Home Assistant -> Clear Cache.

Stef42300 commented 8 months ago

2023-11-06_14-21-10 I have a problem, I replaced all 29 references to paper-input with ha-textfield in the js file and compress it. I copied the 2 files in the folder but an error appear when I cleared the browser cache 2023-11-06_14-24-33

I made a mistake but where ?

TheSimTek commented 8 months ago

After repeating the steps to replace all paper-input with the ha-textfield in the js file and compress it I am in the same situation as Stef42300. The custom element does not exist.

Anyone got the two files that work in a dropbox for us to try? Is there other settings in the configuration.yaml that were needed?

flyman1664 commented 8 months ago

2023-11-06_14-21-10 I have a problem, I replaced all 29 references to paper-input with ha-textfield in the js file and compress it. I copied the 2 files in the folder but an error appear when I cleared the browser cache 2023-11-06_14-24-33

I made a mistake but where ?

Try to delete .gz file from the directory

Stef42300 commented 8 months ago

Thanks, it works! You must delete the "mini-media-player-bundle.js.gz" and it generate a new file named "mini-media-player-bundle.js.bak" image I restart an cleared the cache and it's good. image

freirejc commented 8 months ago

So let's see if it is the step by step:

  1. replace all paper-input with the ha-textfield in the js file
  2. Delete the compressed file
  3. Restart HA and clear the cash

Is it right?

Thanks, it works! You must delete the "mini-media-player-bundle.js.gz" and it generate a new file named "mini-media-player-bundle.js.bak"

image

I restart an cleared the cache and it's good.

image

Stef42300 commented 8 months ago

So let's see if it is the step by step:

  1. replace all paper-input with the ha-textfield in the js file
  2. Delete the compressed file
  3. Restart HA and clear the cash

Is it right?

Thanks, it works! You must delete the "mini-media-player-bundle.js.gz" and it generate a new file named "mini-media-player-bundle.js.bak" image I restart an cleared the cache and it's good. image

Yes 😉

TheSimTek commented 8 months ago

Now working as above. Many thanks for the assistance in getting this feature back up and running.

freirejc commented 8 months ago

So let's see if it is the step by step:

  1. replace all paper-input with the ha-textfield in the js file
  2. Delete the compressed file
  3. Restart HA and clear the cash

Is it right?

Thanks, it works! You must delete the "mini-media-player-bundle.js.gz" and it generate a new file named "mini-media-player-bundle.js.bak" image I restart an cleared the cache and it's good. image

Yes 😉

Tnx...

all working now! SUPER

richsimpson commented 8 months ago

Great work on the solution. Worked for me

SDR3078 commented 7 months ago

The solution worked for me en for others, I will close the issue.

Korpip commented 7 months ago

Why close this? It is still not a rolled out solution.

zenderman commented 7 months ago

I changed the "paper-input" field to "ha-textfield" in the files "/config/www/mini-media-player-bundle.js" and "/config/www/community/mini-media-player/mini-media-player-bundle.js" And everything started working! Thank you! image

Thanks it helped me!

SDR3078 commented 7 months ago

Why close this? It is still not a rolled out solution.

I'll reopen, you're right

bkr1969 commented 7 months ago

This has not worked for me at all. Edited the .js file, deleted the .gz, recompressed the .js, cleared the cache, restarted, nothing different.

GigaVik commented 7 months ago

У меня это вообще не сработало. Отредактировал файл .js, удалил .gz, повторно сжал .js, очистил кеш, перезапустил, ничего особенного.

I didn't squeeze anything. Just fixed .js and removed .gz. Restarted HA. Another correct way to clear the application and browser cache is: For Chrome:

  1. In your browser, type the key combination Ctrl + Shift + Delete. After this, the “Clear history” page will automatically open in the settings.
  2. Check only the “Images and other files saved in cache” checkbox. Then select the desired time range from the drop-down list. Passwords and authorizations are saved (they are in cookies).
flyman1664 commented 7 months ago

This has not worked for me at all. Edited the .js file, deleted the .gz, recompressed the .js, cleared the cache, restarted, nothing different.

Check also the dashboard ressources and change the url's ending. image

You can add v=1.16.5-beta for example

christopher-lambe commented 7 months ago

The fix worked for me.. Grabbed the file with winscp and compressed it to gzip with 7-zip and copied it back again

TechEnthusiastHA commented 7 months ago

I'm fairly "green" to HA and the learning curve has been tremendous.

So far I've replaced all instances of "paper-input" to "ha-textfield" then I deleted the .gz file.

My questions now are the next steps: 1) how do I compress the file to produce the .bak file? I'm using Studio Code Server in the Desktop App. 2) is it necessary to clear the cache in the browser if I am doing this all in the desktop app? It doesnt make sense to me so I'm just trying to understand.

dysphasi commented 7 months ago
  1. You can use an app such as 7-zip to compress in the correct format. However, I believe you should be fine to just delete the gz file and a new one will be made automatically - someone correct me please if I'm wrong.

  2. Yes, you absolutely need to clear browser cache if you wish to see the changes right away. Else it will just show what was already there, the newly adapted file will not be used, only what has been pre-stored into the browser cache. Cache provides means for faster access/loading of a site/page that has already been opened before. When the same site is loaded after the browser is closed, it's like a snapshot of an instance...

On Fri, 17 Nov 2023, 19:16 TechEnthusiastHA, @.***> wrote:

I'm fairly "green" to HA and the learning curve has been tremendous.

So far I've replaced all instances of "paper-input" to "ha-textfield" then I deleted the .gz file.

My questions now are the next steps:

  1. how do I compress the file to produce the .bak file? I'm using Studio Code Server in the Desktop App.
  2. is it necessary to clear the cache in the browser if I am doing this all in the desktop app? It doesnt make sense to me so I'm just trying to understand.

— Reply to this email directly, view it on GitHub https://github.com/kalkih/mini-media-player/issues/785#issuecomment-1816956073, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6EBVNEVNIZPKNKW4IB7GTYE6Z2PAVCNFSM6AAAAAA63LXHX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWHE2TMMBXGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

TechEnthusiastHA commented 7 months ago

Maybe I’m missing a step but I don’t see how to force it to generate a new compressed file as some have stated on here. I did use the 7-zip file and uploaded the file named .js.bak to the folder and also cleared cache cookies from chrome and edge. No dice. Will keep seeing what I’m doing wrong.

TechEnthusiastHA commented 7 months ago

Guys I figured it out, I didn’t hit save in the studio editor. Everything looks good now, thank you!

image969 commented 7 months ago

Awesome fix. Definitely worked first try for me after clearing cache.

I might be getting greedy, cause this fix is brand new, but does anyone have some CSS already done up to make it look like it used to? Was much better and felt part of the player before.

DrSpaldo commented 7 months ago

Just FYI for those reading out there. The update to v1.16.6 didn't fix it for me. Then I tried editing the js file manually making the changes. That still didn't fix the issue.

For me, the thing that fixed it, was by going into the HACS store and 'redownloading' it via the three dots. Then the TTS box appeared again. Just for those that may come across the same situation