You wrote āit looks badā but has not specified what is exactly ābadā, the āgood looking pictureā is not provided too. Not to mention absence of MWE.
On the desktop it looks like this:
I have this custom:grid-layout configured:
- type: custom:grid-layout
title: _living_room
path: 1
square: false
layout:
#default
grid-gap: 1px 1px
grid-template-columns: repeat(4, 1fr)
grid-template-rows: auto
grid-template-areas: |
" chips chips chips chips "
" t1 t1 t1 t1 "
" l1 l1 l1 l1 "
" t2 t2 t2 t2 "
" k2 k2 k2 k2 "
" t3 t3 t3 t3 "
" m1 m2 m3 . "
" m4 m5 . . "
" t4 t4 t4 t4 "
" dw1 dw1 dw1 dw1 "
" t5 t5 t5 t5 "
" b1 b1 b1 b1 "
mediaquery:
#phone
"(max-width: 800px)":
grid-gap: 1px 1px
grid-template-columns: repeat(2, 1fr)
grid-template-areas: |
" chips chips "
" t1 t1 "
" l1 l1 "
" t2 t2 "
" k2 k2 "
" t3 t3 "
" m1 m2 "
" m3 . "
" m4 m5 "
" t4 t4 "
" dw1 dw1 "
" t5 t5 "
" b1 b1 "
#portrait
"(max-width: 1200px)":
grid-gap: 1px 1px
grid-template-columns: repeat(3, 1fr)
grid-template-areas: |
" chips chips chips "
" t1 t1 t1 "
" l1 l2 l3 "
" t2 t2 t2 "
" k2 k2 k2 "
" t3 t3 t3 "
" m1 m2 m3 "
" m4 m5 . "
" t4 t4 t4 "
" dw1 dw1 dw1 "
" t5 t5 t5 "
" b1 b1 b1 "
And this is the displayed section of the lights:
- type: custom:auto-entities
card:
type: grid
#columns: 4
column_width: 50%
square: false
card_param: cards
filter:
include:
- domain: light
area: wohnzimmer
options:
type: custom:button-card
template: card_light
variables:
ulm_card_light_enable_color: true
ulm_card_light_enable_slider: true
ulm_card_light_enable_collapse: true
ulm_card_light_force_background_color: true
ulm_card_light_enable_popup: true
view_layout:
grid-area: l1
On mobile it should look like this (2 columns) and on Tablet in three columns:
So, this is a not an auto-entities
issue, this is about layout-card
.
Sorry to bring up a very old comment but I would like to do what ha_popbox was wanting to achieve however I canāt simply use template sensors as the entity_idās are dynamic. (once a parcel has been delivered I remove it from SeventeenTrack, likewise any new parcel is added as has a new entity_id)
I use the SeventeenTrack integration to track parcels and this creates an entity for each parcel and as such the entity_id has the parcel description in it, which obviously changes with each parcel I tell it to track.
I currently use auto-entities to generate a card showing the incoming parcels by way of using wildcards and this shows the parcels, but as ha_popbox said, it gives the state, not an attribute. Iād like to show a particular attribute of each entity.
Current code
title: Parcel Tracking
type: custom:stack-in-card
cards:
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.seventeen*
state: In Transit
exclude: []
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.seventeen*
state: Not Found
exclude: []
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.seventeen*
state: Delivered
exclude: []
Card view:
Entity:
Iād like it to show the attribute called āinto_textā rather than the state.
Is this possible? I see that the standard HA entities card allows for showing an attribute but Iām not sure if / how I can use auto-entities to generate the list of entities for that card.
Is there a way to mix this card with custom:entity-attributes-card ?
- entity_id: sensor.seventeen*
state: Not Found
options:
type: attribute
attribute: xxxx
In case of many parcels it is better to combine auto-entities
with flex-table-card
- then you may display even more attributes in a compact way.
Is that options: code supposed to be in the auto-entities card like this below?
title: Parcel Tracking
type: custom:stack-in-card
cards:
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.seventeen*
state: In Transit
exclude: []
options:
type: attribute
attribute: info_text
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.seventeen*
state: Not Found
exclude: []
options:
type: attribute
attribute: info_text
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.seventeen*
state: Delivered
exclude: []
options:
type: attribute
attribute: info_text
ā¦because that didnāt change the look of the card at all, still just seeing it list the āstatesā.
Thanks, Iāll look into this card.
Thanks. I fixed it up so itās now:
code
title: Parcel Tracking
type: custom:stack-in-card
cards:
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.seventeen*
state: In Transit
options:
type: attribute
attribute: info_text
exclude: []
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.seventeen*
state: Not Found
options:
type: attribute
attribute: info_text
exclude: []
- type: custom:auto-entities
card:
type: entities
filter:
include:
- entity_id: sensor.seventeen*
state: Delivered
options:
type: attribute
attribute: info_text
exclude: []
ā¦which works, however due to the length of the entity_id it gets cut off when the card displays it. Is there a way to remove part of the entity_id or even replace it with the text from another attribute?
Ideally Iād like to remove āseventeentrack packageā from what is displayed so it only shows the description, then the info_text from the attribute.
If an entity has a friendly_name - it will be displayed instead.
Or you may want to display a custom name like āParcel from Tokyoā composed from attributes / entity_id - this may be achieved by using a ātemplateā option, look for examples in the thread.
Yeah sorry, it is actually a very long friendly name.
Then extract a significant part from the name and show it instead.
Or you may reconsider a design:
ā long name - as a ānameā
ā state (which seems to be long too) - as a āsecondary_infoā
ā last_changed - as a state
inside a template-entity-row
Hi,
Is there a way to use images insteat of icons in de auto-enitities card?
Now have this (Auto-Entities)
My wish:
There is but itās completely unrelated to the auto-entities card. You can set the images above as an entity_picture
for each of the entities. Look here for more info.
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.
Thank you, learned something!
Triple thankyou That works!
I was playing around because you metioned the āoptionā on github but I think I made a mistake with the placement of the lines.
Iām not exactly sure when it stopped working, so apologies if I have missed something in the last few releasesā¦ I have just noticed that two of my sensors are no longer appearing in my auto entities list. They were both limited to be equal to or less than 7 days, so only the next upcoming bin collection was displayed. Ie. Green or Recycling. Here is the code:
filter:
include:
- entity_id: sensor.anniversary*
- entity_id: sensor.recycling
attributes:
days: "<= 7"
- entity_id: sensor.green
attributes:
days: "<= 7"
sort:
method: state
numeric: true
count: 6
Anyone have an idea what would have stopped it from working and what I can change to get it back?
Thanks for the reply @Ildar_Gabdullin. It must be the way the sensor is reporting what the value is. I must have to change the word ādaysā instead, just have to work out what to!
I do not see the ādaysā attribute here.
There is a state only (probably including UoM).
If the state contains a UoM - then you cannot do math operations (I suspect), then you will have to use a templated filter here (ātemplateā option).