Live demo
These are real Home Assistant cards, built by the card from the templates in the YAML below and drawn by Home Assistant's own frontend, loaded from demo.home-assistant.io. The house is made up and lives in your browser: the tiles switch and dim, but there is no Home Assistant behind them, so nothing is sent anywhere.
Each tab shows one idea. First template is one template used three times with different variables. Every light is a single card that makes a tile for each light the house has. Rooms is a whole view written by the card: a section per area and a badge per light.
The dashboard
Everything the demo draws comes from this, written as it would be on your own dashboard. The templates sit at the top, level with views:.
The house
The entities and areas the demo makes up. for_each_from and the Rooms view read these the way they read your own Home Assistant.
On your own page
Home Assistant's live demo elements work on any web page. Load the card after embed.js, then put your templates in the dashboard of an ha-embed-dashboard or ha-embed-view, as here:
<script type="module" src="https://demo.home-assistant.io/embed.js"></script>
<script type="module" src="https://tempus2016.github.io/decluttering-card-plus/assets/card/decluttering-card-plus.js"></script>
That copy of the card is updated whenever the card changes. A lone ha-embed-card has no dashboard around it, so it has no templates to use. Several demos on one page all read their templates from the first that has drawn, so give each the same decluttering_templates:.