thomasloven / lovelace-state-switch

🔹Dynamically replace lovelace cards depending on occasion
MIT License
382 stars 27 forks source link

Card disappears after refresh #36

Open SEngelnkemper opened 4 years ago

SEngelnkemper commented 4 years ago

This may be related to the issue after Homeassistant 0.110 update which should be resolved with the last commit.

I'm running Homeassistant 0.110.7. The behavior is all the same across all browsers I tested, Chrome, Chromium, Firefox, Safari:

If I initially access the frontend in a new browser window/tab the cards show up as usual. After refreshing the respective window/tab alle cards come back except the state-switch cards. They simply disappear. However, in the UI-Editor they are of course still present.

I use the cards without any transitions, heres an example:

- type: 'custom:state-switch'
  default: above_horizon
  entity: sun.sun
  states:
    above_horizon:
      aspect_ratio: 80%
      type: iframe
      url: /local/windy_panel_day.html
    below_horizon:
      aspect_ratio: 80%
      type: iframe
      url: /local/windy_panel_night.html
bcutter commented 3 years ago

Probably related to https://github.com/thomasloven/lovelace-state-switch/issues/41 ? Check if you´re using state-switch correctly. Maybe the card type is missing at all.

thomasloven commented 2 years ago

Please try release 1.9.0

maniscalcojohn commented 2 years ago

Having this same issue recently, but it is limited to a specific state. Running the latest versions of everything and the card is a picture-elements card with card-mod. I have to switch states to get the card to show up.

AndyVRD commented 1 year ago

I'm still experience this behaviorw with the latest 1.9.5 version. It seems that the delay is longer on iOS than Chrome. Is there any ETA wen this will be fixed? Thx in advance

domenix commented 1 year ago

I am experiencing the exact same issue. Refresh usually fixes it, but it could be troublesome on a wall tablet that is in Kiosk mode. Not sure if it could affect it, but I am using the Jinja templating and the template property as well. If I use the template directly in the entity parameter, it still behaves the same way. Doesn't matter if I define two states or just one with default.