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

buttons dissapered after latest HA update 2022.3 #139

Closed
bucky2076 opened this issue Mar 3, 2022 · 54 comments
Closed

buttons dissapered after latest HA update 2022.3 #139

bucky2076 opened this issue Mar 3, 2022 · 54 comments

Comments

@bucky2076
Copy link

I have a page with banner cards. The text caption shows, the icon shows, but all buttons are invisible.

@RamiRihawi
Copy link

RamiRihawi commented Mar 3, 2022

I have the same issue, this part is not working anymore!

        map_state:
          'on':
            icon: mdi:toggle-switch
          'off':
            icon: mdi:toggle-switch-off-outline

@bucky2076
Copy link
Author

seems to me to be an artefact of the upgrade to material.

@bucky2076
Copy link
Author

  • entity: switch.mini_me
    name: mini-me

not working either.

@ajghor
Copy link

ajghor commented Mar 3, 2022

not working for me neither...
Tried installing 1.0.0-beta.3, doesn't work either

@psleutel
Copy link

psleutel commented Mar 3, 2022

Same issue here

@swampylee
Copy link

Exactly the same issue here.

@swampylee
Copy link

swampylee commented Mar 3, 2022

This is not an ideal solution and hopefully @nervetattoo takes pity on us and fixes this but for now I added this to each switch entity in a card so I can at least see if something is on or off. When you click the switch it opens the standard entity card and then you can turn the entity on or off so an extra few mouse clicks but at least you can see the status of switches.

  - entity: switch.thing
    name: Thing
    domain: sensor
    map_state:
      'on':
        color: green
        value: mdi:toggle-switch-outline
      'off':
        color: white
        value: mdi:toggle-switch-off-outline

@matteocorti
Copy link
Contributor

Same here.

@l4r53n
Copy link

l4r53n commented Mar 3, 2022

Same issue here :-(

@mbergdal
Copy link

mbergdal commented Mar 4, 2022

This is probably due to the update from Paper to Material Web Components that has been done in 2022.3 version. The problem seems to be related to the use of the in this code. (Ref: https://www.home-assistant.io/blog/2022/03/02/release-20223/#ui-upgrades)

My solution for now was to edit the /config/www/community/banner-card/banner-card.js and replace all instances of mwc-switch with ha-switch. (I also commented out the CSS-part related to ) Then save the file. (I did all this in the VSCode add-on)

To make the modified file to be served to Lovelace, you then will have to delete the .gz-file in the same folder (as it is served first if it is present). Then clear the browser cache (not only Ctrl+F5), but clear cached files. (Ref: https://hacs.xyz/docs/categories/plugins#special-notes-about-downloaded-lovelace-plugins)

Then refresh the Lovelace frontend and your switches should be present again.

@Spookster
Copy link

"replace all instances of with . "?
Maybe the formatting from your message is missing, but what are you replacing what with what?

@mbergdal
Copy link

mbergdal commented Mar 4, 2022

Sorry, didn't catch that my html-tag was removed. Thanks for pointing that out :) Updated my previous post.

@swampylee
Copy link

Sorry, didn't catch that my html-tag was removed. Thanks for pointing that out :) Updated my previous post.

Thanks very much, this is a much better solution than mine and works great.

@ajghor
Copy link

ajghor commented Mar 4, 2022

@swampylee Many Thanks!
It is alive!

@l4r53n
Copy link

l4r53n commented Mar 4, 2022

Working great, thanks!

@bcmitri
Copy link

bcmitri commented Mar 4, 2022

That seemed to do the trick. Now, does anyone have a similar fix for #133 (Covers no longer shows after HA update)?

@swampylee
Copy link

That seemed to do the trick. Now, does anyone have a similar fix for #133 (Covers no longer shows after HA update)?

I don't have that issue as I don't use Covers but why not try the fix listed in that thread which is to use a custom repository from here: https://github.com/rosskyl/banner-card/releases/tag/0.13.0 and then manually make the modifications above?

@swampylee
Copy link

@swampylee Many Thanks! It is alive!

All thanks should go to @mbergdal

@bcmitri
Copy link

bcmitri commented Mar 4, 2022

That seemed to do the trick. Now, does anyone have a similar fix for #133 (Covers no longer shows after HA update)?

I don't have that issue as I don't use Covers but why not try the fix listed in that thread which is to use a custom repository from here: https://github.com/rosskyl/banner-card/releases/tag/0.13.0 and then manually make the modifications above?

I can try again, but I seem to recall that was just an earlier fork of the code which is either missing other fixes, including mapping attributes.

@ahbrims
Copy link

ahbrims commented Mar 4, 2022

I installed HA version 2022.3 yesterday and got the same problem, but today have installed again and now it works ok chrome on my Mac without @[mbergdal] changes. It still is not working in the HA app. I do note that the ha version is 2022.3.1 today, unsure if this is a change from yesterday? Anyway, the issue seems to have gone away?

@nogueirasa
Copy link

Same here.

image

Back to version 2022.2

@tchellomello
Copy link

tchellomello commented Mar 5, 2022

Same here but with the comment from @mbergdal (#139 (comment)) worked like a charm. Thank you!!!

image

@Soyde
Copy link

Soyde commented Mar 5, 2022

Could you help me?
I'm trying to apply solution from @mbergdal (#139 (comment)), I replaced 3 coincidences at /config/www/community/banner-card/banner-card.js.
Also deleted gz file, cleared browser cache (indeed I also installed another plugin via HACS in order to do a forced clear cache when it is requested after installing other plugin) and also restarted Homeassistant but my buttons are still missing.

Maybe I'm missing this part, but I don’t know what to do "I also commented out the CSS-part related to"

Maybe someone can pass me the whole edited js file?

Please, help!
Thanks

@swampylee
Copy link

Could you help me? I'm trying to apply solution from @mbergdal (#139 (comment)), I replaced 3 coincidences at /config/www/community/banner-card/banner-card.js. Also deleted gz file, cleared browser cache (indeed I also installed another plugin via HACS in order to do a forced clear cache when it is requested after installing other plugin) and also restarted Homeassistant but my buttons are still missing.

Maybe I'm missing this part, but I don’t know what to do "I also commented out the CSS-part related to"

Maybe someone can pass me the whole edited js file?

Please, help! Thanks

All I can suggest is that you go into Chrome settings and clear cache there, close browser and try again. If that doesn't work then you can try removing the CSS part you refer to which I think is this line highlighted with style.... below.

`    `}renderCustomElement(t,e,i=""){if(customElements.get(t))return this._renderCustomElement(t,e,i);console.error(t+" doesn't exist")}renderAsToggle({onClick:t,size:e,name:i,state:s,domain:n,entity:r,color:o}){return o=o||"var(--switch-checked-color)",j`
      <div class="entity-state" style="${this.grid(e)}">
        ${ot(i,t)}
        <span class="entity-value">
          <ha-switch
            **style="--mdc-theme-secondary: ${o};"**
            ?checked=${"on"===s}
            @click=${this._service(n,"toggle",r)}
          >
          </ha-switch>
        </span>
      </div>`

@matteocorti
Copy link
Contributor

This is probably due to the update from Paper to Material Web Components that has been done in 2022.3 version. The problem seems to be related to the use of the in this code. (Ref: https://www.home-assistant.io/blog/2022/03/02/release-20223/#ui-upgrades)

My solution for now was to edit the /config/www/community/banner-card/banner-card.js and replace all instances of mwc-switch with ha-switch. (I also commented out the CSS-part related to ) Then save the file. (I did all this in the VSCode add-on)

To make the modified file to be served to Lovelace, you then will have to delete the .gz-file in the same folder (as it is served first if it is present). Then clear the browser cache (not only Ctrl+F5), but clear cached files. (Ref: https://hacs.xyz/docs/categories/plugins#special-notes-about-downloaded-lovelace-plugins)

Then refresh the Lovelace frontend and your switches should be present again.

It works like a charm. No need to comment out the CSS part.

matteocorti added a commit to matteocorti/banner-card that referenced this issue Mar 5, 2022
@Neu-Bob
Copy link

Neu-Bob commented Mar 5, 2022

https://hacs.xyz/docs/categories/plugins#special-notes-about-downloaded-lovelace-plugins

I'm having issues clearing the cache... any tips for that?

@l4r53n
Copy link

l4r53n commented Mar 5, 2022

If you are using chrome: Shift + CTRL + DEL

@moelloman
Copy link

moelloman commented Mar 5, 2022

Hi, the workaround from @mbergdal in comment #139 works on the computer but not on the mobile phone. I use iOS Safari and the light switches are not shown. Any idea how to fix? Will be available an update of the frontend soon?

@mbergdal
Copy link

mbergdal commented Mar 5, 2022

Hi, the workaround from @mbergdal in comment #139 works on the computer but not on the mobile phone. I use iOS Safari and the light switches are not shown. Any idea how to fix? Will be available an update of the frontend soon?

Works on my phone iPhone and iPad. Could this be a caching problem? Not sure how to force a cache update in iOS...

@matteocorti
Copy link
Contributor

Hi, the workaround from @mbergdal in comment #139 works on the computer but not on the mobile phone. I use iOS Safari and the light switches are not shown. Any idea how to fix? Will be available an update of the frontend soon?

Works on my phone iPhone and iPad. Could this be a caching problem? Not sure how to force a cache update in iOS...

Device Settings (I don't have the English version) and then debug. You should have an option to clear the caches.

@moelloman
Copy link

Thanks @mbergdal and @matteocorti .
It works in the browser but what I ment originally (sorry for my missleading post) is the mobile App. Any proposal to fix it there?

@matteocorti
Copy link
Contributor

Thanks @mbergdal and @matteocorti .

It works in the browser but what I ment originally (sorry for my missleading post) is the mobile App. Any proposal to fix it there?

Device Settings (I don't have the English version) and then debug. You should have an option to clear the caches.

@moelloman
Copy link

Thanks @mbergdal and @matteocorti .
It works in the browser but what I ment originally (sorry for my missleading post) is the mobile App. Any proposal to fix it there?

Device Settings (I don't have the English version) and then debug. You should have an option to clear the caches.

Found it, It's in App Settings- Debug - Clear local app cache. Thanks 👍

@crempp
Copy link

crempp commented Mar 6, 2022

It appears upkeep on this plugin has slowed down or stopped. I use this card very extensively in my setup so it's important for me to keep it working. For that reason I have forked the repo and I have been merging in PRs submitted to @nervetattoo to fix many of the issues encountered over the past few months. I don't intend to take over development of this card but I realized that many issues are quickly fixed with PRs submitted only to sit unmerged. I figured it would be easy to just fork and pull the PRs over and publish releases.

If you would like to use my fork please feel free but keep in mind I don't guarantee anything. I will probably fix any catastrophic errors I will merge in bug fix PRs from the parent repo. I really hope @nervetattoo has time to get back to this because I love this card.

  1. Remove the old Banner Card from HACS
  2. Go to HACS, select "Frontend" and then click the three dots in the upper right and select "Custom Repositories"
  3. Enter Repository: https://github.com/crempp/banner-card and Category: Lovelace
  4. Click add

After the custom repository is added you'll see a new card available on the HACS Frontend page. Click "Download". You'll have to reload the frontend but you shouldn't have to change any usages of the card. It should just work.

I hope this helps.

@bcmitri
Copy link

bcmitri commented Mar 6, 2022

It appears upkeep on this plugin has slowed down or stopped. I use this card very extensively in my setup so it's important for me to keep it working. For that reason I have forked the repo and I have been merging in PRs submitted to @nervetattoo to fix many of the issues encountered over the past few months. I don't intend to take over development of this card but I realized that many issues are quickly fixed with PRs submitted only to sit unmerged. I figured it would be easy to just fork and pull the PRs over and publish releases.

If you would like to use my fork please feel free but keep in mind I don't guarantee anything. I will probably fix any catastrophic errors I will merge in bug fix PRs from the parent repo. I really hope @nervetattoo has time to get back to this because I love this card.

  1. Remove the old Banner Card from HACS
  2. Go to HACS, select "Frontend" and then click the three dots in the upper right and select "Custom Repositories"
  3. Enter Repository: https://github.com/crempp/banner-card and Category: Lovelace
  4. Click add

After the custom repository is added you'll see a new card available on the HACS Frontend page. Click "Download". You'll have to reload the frontend but you shouldn't have to change any usages of the card. It should just work.

I hope this helps.

Doing the Lord's work. Unfortunately, you seem to be missing some fixes that were added in the following releases:

Any chances of getting those pulled in?

@crempp
Copy link

crempp commented Mar 6, 2022

@bcmitri Thanks!

I didn't look at changes in the beta branch because I was uncertain how much had changed and what level of effort would be required to merge them in. I took a quick look and it doesn't look too crazy. I'll try it out later when I get some time.

@crempp
Copy link

crempp commented Mar 6, 2022

@bcmitri, I cherry picked the three major fixes from those beta releases. Most of the changes in beta are for Github automations, switching the test runner and looks like an attempt to move to typescript. I'm not going to mess with that.

I didn't merge in anything from beta.1 since the only meaningful fix was Support row_size: auto which was already included in the master branch. I merged in the fixes in beta.2 and beta.3 for

There's a new release (0.13.3) you should be able to update to in HACS. I tested that the card still functions but I don't use those features so I didn't test the features themselves.

Enjoy!

@bcmitri
Copy link

bcmitri commented Mar 6, 2022

@crempp Those were the ones! And, at a glance, it seems like everything is working properly. Thanks so much!

@bucky2076
Copy link
Author

working now for me too... can't thank you enough....

@psleutel
Copy link

psleutel commented Mar 7, 2022

@bcmitri Thanks so much!

Works as designed again

@swampylee
Copy link

@crempp Thanks very much - all working great!

@maiconguelere
Copy link

I have another workaround
I just added "domain: sensor", an icon and an action to every "toggle" that dissapeared

It was like this:

  - entity: switch.light_1
    name: Light 1
    color: black
    map_state:
      'on':
        color: yellow

And now it is like this

  - entity: switch.light_1
    name: Light 1
    domain: sensor
    action:
      service: switch.toggle
    value: mdi:lightbulb
    color: black
    map_state:
      'on':
        color: yellow

@wehrstedt
Copy link

That seemed to do the trick. Now, does anyone have a similar fix for #133 (Covers no longer shows after HA update)?

wehrstedt@f4e634e

@crempp
Copy link

crempp commented Mar 8, 2022

@wehrstedt I included your fix (thank you for that) in my forked release so you or others can point HACS at the forked repo.

@wehrstedt
Copy link

wehrstedt commented Mar 8, 2022

@wehrstedt I included your fix (thank you for that) in my forked release so you or others can point HACS at the forked repo.

Thanks, but im currently maintain my own fork (once it stops working due to HA updates) because I'm still waiting that #114 will be merged someday ... Are you actively maintain your fork?

@clwolf75
Copy link

clwolf75 commented Mar 8, 2022

Now I'm confused at which fork to get! lol. But this worked great. And I prefer the icons versus the toggles.

I have another workaround I just added "domain: sensor", an icon and an action to every "toggle" that dissapeared

It was like this:

  - entity: switch.light_1
    name: Light 1
    color: black
    map_state:
      'on':
        color: yellow

And now it is like this

  - entity: switch.light_1
    name: Light 1
    domain: sensor
    action:
      service: switch.toggle
    value: mdi:lightbulb
    color: black
    map_state:
      'on':
        color: yellow

@wehrstedt
Copy link

I do not recommend to use mine. I only update my fork if something does not work in my setup. But it is also not useful to maintain different forks. Thats why i asked. I dont think that this project will be maintained anymore.

@clwolf75
Copy link

clwolf75 commented Mar 8, 2022

That's unfortunate. I just created my dashboard about a week ago. I was going to use area cards, but they are very limited, so I found this card.

@nogueirasa
Copy link

It appears upkeep on this plugin has slowed down or stopped. I use this card very extensively in my setup so it's important for me to keep it working. For that reason I have forked the repo and I have been merging in PRs submitted to @nervetattoo to fix many of the issues encountered over the past few months. I don't intend to take over development of this card but I realized that many issues are quickly fixed with PRs submitted only to sit unmerged. I figured it would be easy to just fork and pull the PRs over and publish releases.

If you would like to use my fork please feel free but keep in mind I don't guarantee anything. I will probably fix any catastrophic errors I will merge in bug fix PRs from the parent repo. I really hope @nervetattoo has time to get back to this because I love this card.

  1. Remove the old Banner Card from HACS
  2. Go to HACS, select "Frontend" and then click the three dots in the upper right and select "Custom Repositories"
  3. Enter Repository: https://github.com/crempp/banner-card and Category: Lovelace
  4. Click add

After the custom repository is added you'll see a new card available on the HACS Frontend page. Click "Download". You'll have to reload the frontend but you shouldn't have to change any usages of the card. It should just work.

I hope this helps.

Thanks @crempp , back to home assistant updated

@crempp
Copy link

crempp commented Mar 10, 2022

@wehrstedt I included your fix (thank you for that) in my forked release so you or others can point HACS at the forked repo.

Thanks, but im currently maintain my own fork (once it stops working due to HA updates) because I'm still waiting that #114 will be merged someday ... Are you actively maintain your fork?

@wehrstedt let's say I'm actively pulling in fixes submitted to this repo and other forks and I'm preparing releases in a way that HA can accept. As issues arise I'm watching this repo and other forks and I just pull the PRs into mine and create a release. At least that's my plan. If you have more fixes in the future please tag me and I'll pull them into my fork. So, in summary, I'm going to try to keep up but I really don't want to take over development of this project.

@tomod3606
Copy link

This is probably due to the update from Paper to Material Web Components that has been done in 2022.3 version. The problem seems to be related to the use of the in this code. (Ref: https://www.home-assistant.io/blog/2022/03/02/release-20223/#ui-upgrades)

My solution for now was to edit the /config/www/community/banner-card/banner-card.js and replace all instances of mwc-switch with ha-switch. (I also commented out the CSS-part related to ) Then save the file. (I did all this in the VSCode add-on)

To make the modified file to be served to Lovelace, you then will have to delete the .gz-file in the same folder (as it is served first if it is present). Then clear the browser cache (not only Ctrl+F5), but clear cached files. (Ref: https://hacs.xyz/docs/categories/plugins#special-notes-about-downloaded-lovelace-plugins)

Then refresh the Lovelace frontend and your switches should be present again.

I've followed this and it worked well for all the switches, however the media player controls still don't show up. Is there a fix for this section anywhere?

@jak119
Copy link

jak119 commented Apr 16, 2022

I didn't like the idea of manually editing the .js file so while #140 is pending acceptance I went ahead and created a fork which integrated those changes. If you wish you can add the repo as a manual repo, uninstall "Lovelace banner card" and install "Lovelace banner card fork"

@lovedreamland
Copy link

I didn't like the idea of manually editing the .js file so while #140 is pending acceptance I went ahead and created a fork which integrated those changes. If you wish you can add the repo as a manual repo, uninstall "Lovelace banner card" and install "Lovelace banner card fork"

Hello, this version I use the switch is normal, but the curtain still cannot be displayed

@smacks0048
Copy link

That seemed to do the trick. Now, does anyone have a similar fix for #133 (Covers no longer shows after HA update)?

I don't have that issue as I don't use Covers but why not try the fix listed in that thread which is to use a custom repository from here: https://github.com/rosskyl/banner-card/releases/tag/0.13.0 and then manually make the modifications above?

I can try again, but I seem to recall that was just an earlier fork of the code which is either missing other fixes, including mapping attributes.

Hi all, I managed do fix the issue with the switches - thank you for the hints.

Did anyone fix the issue with the covers? I am still struggling with that one.

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

No branches or pull requests