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

No Elements when casting via cast.show_lovelace_view with custom:grid-layout #209

Open
4 tasks done
kleinerhobbit opened this issue Sep 5, 2022 · 15 comments
Open
4 tasks done

Comments

@kleinerhobbit
Copy link

My Home Assistant version: 2022.8.7

Layout-card version (FROM BROWSER CONSOLE): 2.4.2

What I am doing: try to cast a dashboard to google-hub

What I expected to happen: show dashboard like in chrome-browser on my pc

What happened instead: only background image gets displayed. no enities and no informations.

Minimal steps to reproduce:

views:
  - path: grid
    title: Grid layout
    type: custom:grid-layout
    layout:
      grid-template-columns: auto 30px 25%
      grid-template-rows: auto
      grid-template-areas: |
        "header header header"
        "main . sidebar"
        "footer footer footer"
    cards:
      - type: entities
        entities:
          - entity: light.bed_light
        title: '1'
        show_header_toggle: false
        view_layout:
          grid-area: header

Error messages from the browser console: unable to get


By putting an X in the boxes ([X]) below, I indicate that I:

  • Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
  • Have made sure I am using the latest version of the plugin.
  • Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
  • Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
@arsenicks
Copy link

I have the same issue here, tried different layout nothing work outside of masonry default layout..

@arsenicks
Copy link

@kleinerhobbit you can try this, it seems to help, I've found this in an old version of the README file.

Note for Home Assistant Cast users

Layout-card doesn't entirely work with Cast at this time. Specifically, the view may or may not load in if you start a Cast directly to a view which uses layout-card.

If you instead load a different view, and then switch to the one using layout-card, things seem to be working better. I hope to be able to fix this soon.

@no2chem
Copy link

no2chem commented Oct 11, 2022

@arsenicks I'm seeing the same issue. Is there a way to programmatically switch the layout?

@arsenicks
Copy link

arsenicks commented Oct 11, 2022

What I'm doing right now is something like that in my automation and so far so good. It's been running for 2 days and seems to work.

Note: My default_view use masonry default..

action:
  - service: cast.show_lovelace_view
    data:
      entity_id: media_player.cast_salon_haut
      dashboard_path: lovelace
      view_path: default_view
  - delay:
      hours: 0
      minutes: 0
      seconds: 15
      milliseconds: 0
  - service: cast.show_lovelace_view
    data:
      entity_id: media_player.cast_salon_haut
      dashboard_path: lovelace
      view_path: cast_rss_feed

@no2chem
Copy link

no2chem commented Oct 12, 2022

Yeah, this seems to work, but it takes too long for it to switch. The 15 seconds appears to be really necessary!

I think this is probably a bug in homeassistant somewhere though. I've tried to set pychromecast up for debug but no success so far

@arsenicks
Copy link

I think this is probably a bug in homeassistant somewhere though. I've tried to set pychromecast up for debug but no success so far

Let us know if you find something. Casting using a default layout works well, I think it's known casting could have problem with some custom component and custom layout. As it was stated in the old version of the readme but was removed later so I guess some fixes has been made inbetween.. Let's wait for some input from dev's, at least there's a workaround :P

@kleinerhobbit
Copy link
Author

Hi all

Sorry for the late reply. Was in holiday.
Will try the workaround with masonry-view asap.

Other interesting thing. The casting of the view is working fine all the time with catt. But there is the problem with the 10min timeout.

Cheers

@nebriv
Copy link

nebriv commented Feb 3, 2023

Just chiming in - cycling the dashboards worked for me as well. Thanks for the tip! Annoying - but hey at least it works 😄

@chiahsing
Copy link

Just want to provide some debug information on this issue: when this happens, the page has:

<hui-error-card style="display: none;"></hui-error-card>

and inside its shadow root is

<ha-alert alert-type="error"> <!--?lit$2959686161$--><pre><!--?lit$2959686161$-->...</pre> </ha-alert>

where those ... is the YAML of the dashboard.

@jurrianv
Copy link

jurrianv commented Aug 3, 2023

I have the same issue. I'm using the workaround for now. Will there be a fix soon?

@radinsky
Copy link

Same issue here, any fix planned?

@tomahawk793
Copy link

Same issue here

@imdeepjee
Copy link

Any update?
I have the same issue

@chrisdrumz
Copy link

Just ran into this issue today when trying to use layout-card to fix the dashboard when casting to a big tv. Does this happen for everyone?

@shettich
Copy link

I'm not sure if this is exactly the same thing or not. I also have issues rendering grid with cast. But, only my larger of 2 views. The smaller view that only has a few cards works. So, I started removing card from the broken view and if I remove enough it works. What I see is that with:

  grid-template-columns: repeat(4, 1fr)
  grid-template-rows: auto

and showing 4 gauge cards for the 1st row, the 4th card flows down to the 1st column of the 2nd row (I can't make this happen on a local browser). Then, with enough cards there is not enough room and nothing renders.

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