This code shows a list of persons:
type: custom:auto-entities
card:
type: entities
filter:
include:
- domain: person
Assume that each āperson
ā entity has an āentity_picture
ā attribute specified (via ācustomize
ā) - then an image will be displayed for this row instead of an icon.
Otherwise - an icon is specified (at least for persons w/o present āentity_picture
ā).
You may change it like:
type: custom:auto-entities
card:
type: entities
filter:
include:
- domain: person
options:
icon: mdi:car
then a āmdi:carā icon is displayed for each row.
This code overrides an image for every row to some fixed one:
type: custom:auto-entities
card:
type: entities
filter:
include:
- domain: person
options:
image: /local/images/devices/ups_sua1500i.png
then the same āUPSā image is displayed for each row.
This code overrides an image for every row to some individual one:
type: custom:auto-entities
card:
type: entities
filter:
template: >-
{% for ENTITY in ..... -%}
{{
{
'entity': ENTITY,
'image': .....
}
}},
{%- endfor %}
This code disables showing available images:
type: custom:auto-entities
card:
type: entities
filter:
include:
- domain: person
options:
image: null
then a default āmdi:accountā is displayed for every row.
If some entity must be displayed in many places with an image and there is only one place where I want to show an icon:
ā then I specify an āentity_picture
ā,
ā and this picture is displayed everywhere (including any card with āauto-entities
ā),
ā and for one place (some card) I need to specify something like āimage: null
ā (as shown above) to disable the image.
If some entity must be displayed in many places with an icon and there is only one place where I want to show an image:
ā then I do not specify an āentity_picture
ā,
ā and an icon is displayed everywhere (including any card with āauto-entities
ā),
ā and for one place (some card) I need to specify something like āimage: xxxxxxxxxx
ā to show the image.