Does anyone know if there’s a way to use area_id() and area_entities() in lovelace? Tried using “Lovelace Card Templater” and “Config Template Card” without any success.
Need to get the image and entities from an area using just the area name.
Yep template example here: (all lights ‘on’ in Area ID XXX)
The question isn’t can it be used in lovelace. Templates are used all over the place but… Some cards dont support templates. (And why I’ve almost completely shifted to using the mushroom template card or custom button card for most things…
To start with area_id(), display an area with the card type: area
The reason for not using the area card is that in this case I only have the Name of the area, not the area ID
Area entities will be used to display other cards if, lets say there is any media_players in the area.
But I just realized it won’t work anyway, cause I would need this in conjunction with lovelace_gen, to be able to send the information to an included file
Here the code gives a list of entities which is fed to the Entities card (as a simple list, i.e. w/o additional options like "secondary_info"). But the card may also create a list of dicts (i.e. with all needed options).
The card may also create a stack (or a grid) of cards for these entities.
Never used the Area card - but I believed that it uses “area_id” as an input parameter:
type: area
area: kitchen ### this is area_id
And you cannot use this “area_id”, you need to use an area’s name, right?
Here the "custom:auto-entities" card is used to show ONE card (do not bother about "vertical-stack") with templated value of some option: