Show or hide card based on domain and area?

Hi,

is there a way to only show a card based on domain type (ex lights) and area?
Let’s say I only want to show a card if there is a “media_player” in the kitchen, not based on state of the entity but rather the existance of one in the area?

A presence of an entity of some domain in some area may be found by using templates.
Currently templates are not supported by conditional card.
Probably possible with custom:state-switch card with templated condition.

Yes, I’ve been using auto-entities and it works fine, but I ran into a problem using lovelace_gen, when I use it in files, then things like area_id, state_attr etc won’t work :frowning:
It’s to bad because I’ve been using it to send variables to included files.
I was hoping to be able to use it to evaluate if the area has any lights or media_player to decide if a card should be rendered or not.