Auto-entities can be used with any card that uses entities:
(as opposed to entity:
).
However - layout-card can take an entities:
option and turn that into once card per itemā¦ (see bottom of the readme).
Auto-entities can be used with any card that uses entities:
(as opposed to entity:
).
However - layout-card can take an entities:
option and turn that into once card per itemā¦ (see bottom of the readme).
Yes your documentation was quite clear on the entities stuff (that is why I asked). I hadnāt looked into layout-card yet and I certainly didnāt know about this feature. Thanks again, I will take a look into this. It might be what I was looking for. A friend of mine is actually making something of this sort I believe. You might have heard of him (@dwains). But this will help me out for the time being.
Anyways thanks again for your awesome work/help.
This quite recent feature in monster-card comes from a contribution/PR iāve made. Nice to see youāve implemented it back in Auto-entites, thanks !
Iāll look your documentation deeper to switch from all my monster-cards to your new one.
Thx for this plugin!
I noticed that in case of using Edge as browser the card doesnt load and gives an error : Custom element doesnāt exist: auto-entities.
In Chrome everything works fine.
Is this a known issue?
yes, Edge is a known issue itself
Looks amazing! Can you please your code ?
Thank you!
Shure, no probleme.
here you are:
cards:
- content: |
# Batteriestatus:
type: markdown
- card:
show_header_toggle: false
type: entities
filter:
exclude:
- entity_id: '*battery_state*'
include:
- entity_id: '*battery*'
show_empty: false
sort:
method: name
numeric: true
type: 'custom:auto-entities'
id: card_batterylow
type: vertical-stack
You might have to play with the include and exlude filter to get your best results.
Withā¦
sort:
method: state
numeric: true
reverse: true
ā¦you get the sorting from the screenshot.
Unfortunately, I canāt easily test or debug in Edge, since Iām a mac user, and the mac version uses the chromium engineā¦
making use of this very nice card, I do wonder what the default sort order is (ie when one doesnāt use sort: in the card config).
My entities are listed in a way I donāt recognize to be alphabetical, or by the config in the backend at all, nor by state or order in the group they auto-populate, well, by anything reallyā¦
Would be cool to understand how and why they are listed as they are:
this is the card config for the Switches cl:
- type: custom:fold-entity-row
head:
type: section
label: Switches cl
entities:
- type: custom:auto-entities
card:
type: entities
show_header_toggle: false
filter:
include:
- entity_id: 'switch.*_cl'
options:
secondary_info: last-changed
or
secondly, if Id like the entities of
- type: custom:fold-entity-row
head:
type: section
label: Lights
entities:
- type: custom:auto-entities
card:
type: entities
show_header_toggle: false
filter:
include:
- group: 'group.all_lights_only'
options:
secondary_info: last-changed
to be sorted according to the group order, what would be the correct sort config?
all_lights_only:
name: All lights only
icon: mdi:lightbulb-outline
entities:
# Philips_Hue_lights
- light.backdoor_outdoors
- light.gate_outdoors
- light.porch_outdoors
- light.laundry_ceiling
- light.dining_corner
- light.symfonisk
- light.dining_table_lamp_1
- light.dining_table_lamp_2
- light.dining_table_lamp_3
- light.kist
- light.cabinet
- light.serre_chair
- light.lounge_chair_regular
etc
etc
etc
Ive filed a FR to add last-triggered to the sort options, which would be way cool to auto generate a card with the most active automations and scripts, and be a magic tool for the inspection of the system. Hope you will consider.
First of all, you are using fold-entity-row and auto-entities the āwrongā way (with the disclaimer that āif itās stupid and it works, itās not stupidā - thereās no actually wrong way).
They are both specificlaly designed to work like
- type: custom:auto-entities
card:
type: custom:fold-entity-row
head:
type: section
label: Lights
filter:
.. etc...
Edit: I must say your way looks really good, though.
Second; last triggered is an attribute of the script, as opposed to last_changed and last_updated which are āmagicalā values. You can already sort by attribute values.
On to your question.
The order the entities show up in if not sorted is the same they are given in the "hass
object", which is pretty much your current Home Assistant state. It depends a bit on your python, version, the order your integrations are loaded in, the order things are set up in your configuration and which sign of the zodiac Jupiter is currently in. In short, think of it as random.
If you use a group, the entities should show up in the same order they are listed in the group definition, but I canāt guarantee it.
Hahaha! The sorting options are awesome as is this card. Really appreciate your great work Thomas.
haha, yes, that was my conclusionā¦ thanks for confirming.
of course! thanksā¦
this doesnt work though:
- type: custom:auto-entities
card:
type: entities
title: All Automations auto
show_header_toggle: false
filter:
include:
- domain: automation
options:
secondary_info: last-triggered
sort:
attribute: last_triggered
well, I hoped, but as you can see it isnāt the case. Sorted them by name for now, which at least has some eye candy, but group order would really be better, since they can be sub-ordered in the group without having to create separate groups.
cool, didnāt realize I did it the wrong way. Still, Iāll try it the correct way, and see if it changes the issues I have
thanks for reporting back!
well it does make a difference, and in fact a significant one. Not in the order of the entities, but in the way it is rendered in the frontend:
my way:
your way:
have to think why this is happening, but, maybe good to realize the difference and make good use of it. Must admit I kind of like the elevated group popping out of the fold as an extra emphasis. But, as you say, not as per original design
Does it exist a way to use the auto-entities to show only the lights and sensors with an state = unavailable
?
@thomasloven I tried to moved from monster-card to auto-entities but I have an issue with Boolean attribute. The following card was working with monster-card, but not with auto-entites:
EDIT: the latest version fixed the issue, thanks !
card:
type: glance
filter:
exclude:
- state: 'off'
- state: unavailable
- entity_id: '*group*'
- attributes:
is_deconz_group: false
include:
- domain: light
options:
tap_action:
action: toggle
show_empty: false
type: 'custom:auto-entities'
@gmario Iām using the following to get unavailable entities:
card:
type: glance
filter:
exclude:
- state: 'off'
- state: 'on'
- entity_id: '*group*'
- attributes:
is_deconz_group: false
include:
- state: unavailable
- domain: light
options:
tap_action:
action: toggle
show_empty: false
type: 'custom:monster-card'
First, this card is amazing. Thank you.
Is there any way to make show_empty: false
based solely on filtered entities?
I only want to show my card if my filter:
include:
entity is true. But when I show my card, I also want to show entities that arenāt filtered.
Currently, my unfiltered entities are making my card show all the time.
HI,
trying to list my hue sensors as follows:
- type: custom:auto-entities
card:
type: entities
title: Hue threshold sensors
show_header_toggle: false
filter:
include:
- entity_id: '*_sensor_threshold'
which works fine, except for one thing: I have 4 threshold sensors for outside (ābuitenā) I like to display together, while now they are scattered in the list. How can I order these to show first or last in the total list groups together?
this is what it looks like right now:
Add a not
to the include filter you already have to filter them out, and then a new filter to filter them back in where you want them.
yes, thanks!
made a decluttering template for it:
auto_hue_sensors:
card:
type: custom:auto-entities
card:
type: entities
title: 'Hue [[type]] sensors'
show_header_toggle: false
filter:
include:
- entity_id: 'sensor.*_[[type]]'
not:
entity_id: '*buiten*'
sort:
method: name
- entity_id: '*buiten_*_[[type]]'
sort:
method: name
and Lovelace config:
- type: custom:decluttering-card
template: auto_hue_sensors
variables:
- type: sensitivity
- type: custom:decluttering-card
template: auto_hue_sensors
variables:
- type: threshold
because to the extra _day and _night extension couldnāt find a way to use the decluttering template for this (yet, might have another go at it later on):
- type: custom:auto-entities
card:
type: entities
title: Hue schedule sensors
show_header_toggle: false
filter:
include:
- entity_id: 'sensor.*_schedule_*'
not:
entity_id: '*buiten*'
sort:
method: name
- entity_id: '*buiten_schedule_*'
sort:
method: name
HI,
have to get back to one of my above posts concerning this auto-entities card for automations:
- type: custom:auto-entities
card:
type: entities
title: All Automations auto
show_header_toggle: false
filter:
include:
- domain: automation
options:
secondary_info: last-triggered
sort:
attribute: last_triggered
the sorting is nowhere near based on the last_triggered attributeā¦ didnāt realize it then, but now that I fixed most other issues, I would like to understand what is incorrect here. Is it too difficult for the frontend to keep adjusting this view based on last_triggered (very frequent triggering) or is the config simply incorrectā¦
note: I am talking about the sort: attribute: last_triggered
, not the secondary_info: last-triggered
, which is something else, and does work alrightā¦
as a matter of fact,I canāt get any sort method to work for this cardā¦ name nor entity_id. Even when I put the sort under the filter, no change is displayed?
really puzzled here.