With YAML frontend I have created a bunch of dashboards containing declutter-cards.
My problem is that I want to also be able to have “dynamic” dashboards so that they can populate their cards with entities given as input parameters.
Why? Well I have quite small on-wall Android screens that can only show 2x3 small cards. A tap on a card that represents a dimmable lamp should open up a full screen control of that dimmable entity to be easily viewed and adjusted. Then that control should be able to be close, showing the initial dashboard where the lamp card was.
TLDR; I was able to make a card with a tap-triggered popup with browser_mod.popup and some card_mod stuff but the not-so-fancy Android screen is just too slow with updating that popup and doing all the DOM modification stuff.
So I tried out a full screen dashboard instead and that rendered much faster. The problem with that dashboard is that the cards will have “hard coded” entities that cannot be altered from another dashboard. Instead I would like to have the entity ID as input variables.
Example of declutter-like non-working code:
Navigation from tapping a card
I know that the card that initiated the navigation could also set a global value that would work as an input to the lamp-dashboard but that solution would be error prone if two lamp-dashboard navigation was made from different locations. (The second one would override the first call)
There might also be a solution to just hide (replace) the 2x3 card grid on the initial dashboard and show another full screen setup of cards instead. But that will not be considered reusing a fullscreen view between different dashboards.
I can’t understand how that would work.
The Panel View is a dashboard that can only show a single card and does it in full screen.
So how can I open this Panel View with input parameters from my decluttering template card that has been tapped?
Thanks!
“lets you pass arguments to included files.”
This looks more promising.
Will have a closer look at the documentation and see if this can solve my issues.
Perhaps a misunderstanding but lovelace_gen (just as the decluttering card) seems to only control the content within the same dashboard. Adding more cards in my calling file/dashboard won’t change anything in the receiving file/dashboard.
Your dashboards will be defined in a file called ui-lovelave.yaml and that one can also be handled by lovelace_gen and therefore be made dynamic.
You will have to refresh your browser or disable caching completely, because that feature will not work with dynamic pages.
I still don’t understand how cards in a Panel dashboard can receive information from other cards in another dashboard?
AFAIK decluttering cards works with input parameters because the receiving templates are in the end merged with the calling cards in the same dashboard.
Lovelace_gen have input features too and I do something similar were I expand label group and get it members and then write them to a file, which is then used as input to lovelace_gen.
May be we are talking about different things.
Assume there is a decluttering template with a layout card representing some dynamic view.
And this card is located on some view in a panel mode.
Assume we need 5 different variants of this card - 5 sets of input variables.
So each unique card will have a separate view.
And there is some “entry point” which navigates to a particular view.
Here you will have to keep 5 separate views.