Templates don't work on cast in panel mode - includes fix proposal
See original GitHub issuePlease forgive me for ignoring the bug report template. I don’t use the button card myself, but I heard there’s a problem with using templates on Cast if the view is in panel mode.
I believe the problem lies here: https://github.com/custom-cards/button-card/blob/master/src/helpers.ts#L151 and was caused by this: https://github.com/home-assistant/frontend/pull/3796/files#diff-8809bcfc38b194872d9c6d1b323b50e8R44-R58
A possible fix might be to replace the marked line in helpers.ts with:
root = root && (root.querySelector('hui-view') || root.querySelector('hui-panel-view'));
I have not tested this.
Checklist
- I updated the card to the latest version available
- I cleared the cache of my browser
Describe the bug A clear and concise description of what the bug is.
Version of the card Version:
To Reproduce This is the configuration I used:
Screenshots If applicable, add screenshots to help explain your problem.
Expected behavior A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top GitHub Comments
Or I could pull out my nest hub from where it’s gathering dust. I need to implement and test the same change to some of my things anyway…
Closing because of inactivity