Combine Tap-Action with Conditional card method to show/hide other cards?

Would like tap-action (or other method?) to show/hide another/separate card; without using the state of an entity (Helper, etc). Anyone know how?

thx!

Collapsible card
Fold-entity-row
Both have own main threads.

I use Collapsible Card (custom:expander-card) a lot but didnt see a way to make it show/hide a card that was not (embedded) connected to it. I want to show/hide a completely separate card.

also pretty sure fold-entity row requires it all to be in a single card?

I need something that is controlling a completely ‘separate’ card.

What’s wrong with using a helper? That’s how I do it.

There are some real things that need helpers, like automation bypasses. Things like this, to show or hide something for a moment, should never need helpers
… it just bloat and over complicated messiness.

If i used helpers for everything of people do, have 100 of them. Template sensors are another example. They are often not needed and often better ways to do the same thing.

No.

The answer.

What you want requires some form of global state or at least some shared (programmatic) scope going beyond a specific card. As you claim to be a dev (from other posts), you should understand that. Helpers are generally the mechanism provided by HA. There are maybe other hacks you can pull to hack the DOM via JS using some custom cards.

Are you about to start another rant?

What makes a card “separate’?
All cards are separate.
If you are thinking about a card which is defined in one place but called from many other places - consider decluttering card.

Sorry, this is unclear. FER is used inside Entities card, a hidden row can be any card.

Physically separated on the page. Using the terminology that the UI uses… within a View it would be showing/hiding a different ‘section’ or ‘card’

I was hoping there was a way to do this without using requiring an Entity, like state-switch does.

IMO we create too many entities (which have global scope) for small things which are for momentary, do not need any persistence – they only need local scope. Helper entities are difficult to keep track of, and harm performance for HA’s web page rendering; specially when using templates/filters/etc.


https://github.com/PiotrMachowski/Home-Assistant-Lovelace-Local-Conditional-card

1 Like