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

2024.7.0b* somehow breaks visibility of the card #117

Open
daemonenstall opened this issue Jun 30, 2024 · 28 comments
Open

2024.7.0b* somehow breaks visibility of the card #117

daemonenstall opened this issue Jun 30, 2024 · 28 comments

Comments

@daemonenstall
Copy link

System information:
lovelace-state-switch: 1.9.5 (also tried master branch)
layout-card: 2.4.5
Core 2024.7.0b5
Supervisor 2024.06.2
Operating System 12.4
Frontend 20240627.0

Since I have updated to the latest beta version of HASS, the card is not shown correctly.

The card should look like this,
grafik
but is shown like this:
grafik

When I use the visual editor, surprisingly the card is shown correctly in the right preview panel.
grafik

By playing around with the panel settings, I have noticed this:
The standard setting for the panel is "raster" and is not working. When I change the setting to "horizontal", "vertical" or "grid" (provided by layout card), the card is working properly again.

@gondlong
Copy link

gondlong commented Jul 4, 2024

Me too, after update to Core 2024.7.0 tonight
All card with custom:state-switch do not appear but they appear normally in the editor.

Screenshot_20240704_104528_Home Assistant
Screenshot_20240704_104720_Home Assistant

@sekonicpr
Copy link

Since I installed 2024.7 I also have the same issue. When I refresh it several times it goes up again but then it disappears again.

@Aldopez
Copy link

Aldopez commented Jul 5, 2024

Me too... Same behaviour

@bermanbt
Copy link

bermanbt commented Jul 6, 2024

Same, my template state switch cards are fine though, it’s only those based on entity state (on/off)

@RN-Say
Copy link

RN-Say commented Jul 6, 2024

Same issue. Following.

@robertoleonardo
Copy link

same. fwiw, i don't think the issue started for me until updating to 2024.7.1 today. though maybe i just didn't notice it on 7.0

@daemonenstall
Copy link
Author

I noticed it at one of the early betas of 7.0.

@bfojtan
Copy link

bfojtan commented Jul 6, 2024

Me too... Same issue.

@enricozocca
Copy link

Since I installed 2024.7 I also have the same issue. When I refresh it several times it goes up again but then it disappears again.

Me too

@CVKBaca
Copy link

CVKBaca commented Jul 7, 2024

Same for me.

@romajl
Copy link

romajl commented Jul 7, 2024

Same issue 😗

@robertoleonardo
Copy link

all - my anecdotal experience from this afternoon is that the problem might be fixed (or at least less prominent) if you set a default state for each state switch card. i hadn't previously done that but i just replaced all the instances of auto populated "default: null" with "default: [your default state here]". something to check in your configuration...though again, it's entirely possible that i just haven't yet seen the issue recur after making that change but it will at some point ...

@bermanbt
Copy link

bermanbt commented Jul 8, 2024 via email

@carealtor
Copy link

Same

@pergolafabio
Copy link

Updated yesterday to 2024.7 release, seeing same issues :-(

Is someone with code skills working on this?

@romajl
Copy link

romajl commented Jul 20, 2024

Install layout-card whit HACS, edit view in your Dashboard. in view type choose "Horizontal (layout-card)" or "Vertical (layout-card)" or "Grid (layout-card)" ... depending on what you want.

@pergolafabio
Copy link

pergolafabio commented Jul 20, 2024

So we need to change all card that ere being used with the State-Switch to the layout card??

@robertoleonardo
Copy link

Install layout-card whit HACS, edit view in your Dashboard. in view type choose "Horizontal (layout-card)" or "Vertical (layout-card)" or "Grid (layout-card)" ... depending on what you want.

this makes me feel like i'm using state switch cards and layout cards all wrong. i use custom layout card already but it's not even sort of a replacement for how i use state switch cards ....

separately, has anyone noticed their dashboard get suppppper laggy since this issue arose? my dashboard is fairly intricate but i'm running hass on a nuc with very little else --- so it's got plenty of juice. and it was fine until recently.

i think that whatever is happening to make the state switch cards not appear until you refresh a few times is taking parts of my dashboard captive until all the stuff with the state switch card figures itself out and loads.

@pergolafabio
Copy link

I stopped using state-switch card, and used the builtin contifional card, one less Hacs for me now

@ShadowFM
Copy link

all - my anecdotal experience from this afternoon is that the problem might be fixed (or at least less prominent) if you set a default state for each state switch card. i hadn't previously done that but i just replaced all the instances of auto populated "default: null" with "default: [your default state here]". something to check in your configuration...though again, it's entirely possible that i just haven't yet seen the issue recur after making that change but it will at some point ...

I can confirm the procedure, for me this was the solution. Thank you for finding the solution!

@daemonenstall
Copy link
Author

I stopped using state-switch card, and used the builtin contifional card, one less Hacs for me now

I will give that a try when I get bored. 😉

@bermanbt
Copy link

bermanbt commented Jul 22, 2024 via email

@CoryAlbrecht
Copy link

I'm having a similar issue with not appearing, and it looks like this repo is no longer under active development as the last update is at least 2 years old.

Has anybody tried contacting @thomasloven or any of the other people who have contributed to see if there is any active interest in going active again? Or perhaps somebody wants to fork and get that added to HACS?

@daemonenstall
Copy link
Author

Maybe we should switch to the built in conditional card.

@CoryAlbrecht
Copy link

#118 #119

@zSprawl
Copy link

zSprawl commented Sep 11, 2024

If you set a default (see docs), it fixes the display issue.

@robertoleonardo
Copy link

robertoleonardo commented Sep 11, 2024

If you set a default (see docs), it fixes the display issue.

it does BUT i have since come to realize that the card still causes other issues. namely, it made the dashboard unusably slow on ios. the default workaround does make them show up right but i couldn't click anything on my phone for a good 15-20 seconds -- so i think whatever was causing the issue on the first place persists in the background even with a default option set. on my computer, it doesn't seem to be an issue, but on iphone -- everything is blocked while that issue sorts itself out over 10-20 seconds.

so, sadly, i had to change all my state switch cards to the og conditional card. i liked the added functionality of state switch cards but it doesn't appear to be maintained and it's definitely not working right anymore, even with the set default bandaid. for now, unless there's an update to state switch, id recommend everyone giving default conditional options (or the other custom conditional card) a shot -- it might fix issues you didn't even realize were related.

@JBakers
Copy link

JBakers commented Sep 26, 2024

Yea, I must admit, switching to the build in conditional card saved me a lot of trouble.

I used to run this card:
It showd a blinking card on the dashboard (green / blue or grey) for organic, plastic or normal garbage.
And it would switch from due tomorrow to due today.

Old config:

square: false
type: grid
cards:
  - type: custom:state-switch
    entity: sensor.gft_ophalen
    default: 7
    states:
      '0':
        type: markdown
        card_mod:
          style: |
            ha-card {
            box-shadow: none;
            font-size: 18px;
            animation: blink 5s infinite;
            text-align: center;
            padding: 0px}
            @keyframes blink {
                      40% {

                        background-color:green;
                          } 
        content: '# Vandaag GFT'
  - type: custom:state-switch
    entity: sensor.pbd_ophalen
    default: 7
    states:
      '0':
        type: markdown
        card_mod:
          style: |
            ha-card {
            box-shadow: none;
            font-size: 18px;
            animation: blink 5s infinite;
            text-align: center;
            padding: 0px}
            @keyframes blink {
                      40% {

                        background-color:blue;
                          } 
        content: '# Vandaag Plastic'
  - type: custom:state-switch
    entity: sensor.restafval_ophalen
    default: 7
    states:
      '0':
        type: markdown
        card_mod:
          style: |
            ha-card {
            box-shadow: none;
            font-size: 18px;
            animation: blink 5s infinite;
            text-align: center;
            padding: 0px}
            @keyframes blink {
                      40% {

                        background-color:grey;
                          } 
        content: '# Vandaag Restafval'
  - type: custom:state-switch
    entity: sensor.gft_ophalen
    default: 0
    states:
      '1':
        type: markdown
        card_mod:
          style: |
            ha-card {
            box-shadow: none;
            font-size: 18px;
            animation: blink 5s infinite;
            text-align: center;
            padding: 0px}
            @keyframes blink {
                      40% {

                        background-color:green;
                          } 
        content: '# Morgen GFT'
  - type: custom:state-switch
    entity: sensor.pbd_ophalen
    default: 0
    states:
      '1':
        type: markdown
        card_mod:
          style: |
            ha-card {
            box-shadow: none;
            font-size: 18px;
            animation: blink 5s infinite;
            text-align: center;
            padding: 0px}
            @keyframes blink {
                      40% {

                        background-color:blue;
                          } 
        content: '# Morgen Plastic'
  - type: custom:state-switch
    entity: sensor.restafval_ophalen
    default: 0
    states:
      '1':
        type: markdown
        card_mod:
          style: |
            ha-card {
            box-shadow: none;
            font-size: 18px;
            animation: blink 5s infinite;
            text-align: center;
            padding: 0px}
            @keyframes blink {
                      40% {

                        background-color:grey;
                          } 
        content: '# Morgen Restafval'
columns: 1

new (and imo better/easier) config:

type: vertical-stack
cards:
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.gft_ophalen
        below: 1
    card:
      type: markdown
      card_mod:
        style: |
          ha-card {
          box-shadow: none;
          font-size: 18px;
          animation: blink 5s infinite;
          text-align: center;
          padding: 0px}
          @keyframes blink {
                    40% {

                      background-color:green;
                        } 
      content: '# Vandaag GFT'
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.pbd_ophalen
        below: 1
    card:
      type: markdown
      card_mod:
        style: |
          ha-card {
          box-shadow: none;
          font-size: 18px;
          animation: blink 5s infinite;
          text-align: center;
          padding: 0px}
          @keyframes blink {
                    40% {

                      background-color:blue;
                        } 
      content: '# Vandaag Plastic'
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.restafval_ophalen
        below: 1
    card:
      type: markdown
      card_mod:
        style: |
          ha-card {
          box-shadow: none;
          font-size: 18px;
          animation: blink 5s infinite;
          text-align: center;
          padding: 0px}
          @keyframes blink {
                    40% {

                      background-color:grey;
                        } 
      content: '# Vandaag Restafval'
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.gft_ophalen
        above: 0
        below: 2
    card:
      type: markdown
      card_mod:
        style: |
          ha-card {
          box-shadow: none;
          font-size: 18px;
          animation: blink 5s infinite;
          text-align: center;
          padding: 0px}
          @keyframes blink {
                    40% {

                      background-color:green;
                        } 
      content: '# Morgen GFT'
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.afvalinfo_thuis_pbd
        above: 0
        below: 1
    card:
      type: markdown
      card_mod:
        style: |
          ha-card {
          box-shadow: none;
          font-size: 18px;
          animation: blink 5s infinite;
          text-align: center;
          padding: 0px}
          @keyframes blink {
                    40% {

                      background-color:blue;
                        } 
      content: '# Morgen Plastic'
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.restafval_ophalen
        above: 0
        below: 2
    card:
      type: markdown
      card_mod:
        style: |
          ha-card {
          box-shadow: none;
          font-size: 18px;
          animation: blink 5s infinite;
          text-align: center;
          padding: 0px}
          @keyframes blink {
                    40% {

                      background-color:grey;
                        } 
      content: '# Morgen Restafval'

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