jusdoit
(Michael)
November 5, 2024, 1:41pm
1524
How would I remove the prefix Cabinets? I have four rooms with many Hue Scenes and this is just one, I hope to add to a popup card.
type: custom:auto-entities
card:
show_name: true
show_icon: false
show_state: false
type: glance
state_color: false
columns: 3
filter:
include:
- domain: scene
area: Cabinets
options:
tap_action:
action: call-service
service: scene.turn_on
service_data:
entity_id: this.entity_id
show_empty: false
sort:
method: none
ignore_case: false
sti0
(Sti0)
November 14, 2024, 9:59pm
1525
Someone got auto-entities to work with the new precise mode?
How to set the grid_options
attribute to resize a single card (e.g. button)?
Hello, I have a problem sorting my garbage cans. These should be sorted in the order in which they are learned. However, 10 always comes first.
type: custom:auto-entities
card:
type: grid
columns: 4
card_param: cards
filter:
include:
- entity_id: sensor.blaue_tonne
options:
type: picture-elements
elements:
- type: state-label
entity: sensor.blaue_tonne
style:
color: black
font-weight: bold
font-size: 1.2rem
top: 50%
left: 50%
image: >-
https://www.heilbronn.de/fileadmin/_processed_/d/7/csm_Piktogramm_Blaue_Tonne_e2a0b827f9.jpg
- entity_id: sensor.gelbe_tonne
options:
type: picture-elements
elements:
- type: state-label
entity: sensor.gelbe_tonne
style:
color: black
font-weight: bold
font-size: 1.2rem
top: 50%
left: 50%
image: >-
https://www.heilbronn.de/fileadmin/_processed_/5/e/csm_Piktogramm_Gelbe_Tonne_c23c9e0328.jpg
- entity_id: sensor.graue_tonne
options:
type: picture-elements
elements:
- type: state-label
entity: sensor.graue_tonne
style:
color: black
font-weight: bold
font-size: 1.2rem
top: 50%
left: 50%
image: >-
https://www.heilbronn.de/fileadmin/_processed_/7/7/csm_Piktogramm_Restmuelltonne_8e0d0c655d.jpg
- entity_id: sensor.braune_tonne
options:
type: picture-elements
elements:
- type: state-label
entity: sensor.braune_tonne
style:
color: black
font-weight: bold
font-size: 1.2rem
top: 50%
left: 50%
image: >-
https://www.heilbronn.de/fileadmin/_processed_/4/e/csm_Piktogramm_Biotonne_b1e84ed581.jpg
exclude: []
sort:
method: state
numeric: true
you arenāt using auto-entities as it should be done, since you explicitly list the entities yourself.
let auto-entities do the work for you, by using a filter to include
, (suggestion: use sensor.*_tonne
) and then you can also make the sort
work
see Garbage pickup date (mijnafvalwijzer.nl) custom_component - #944 by Mariusthvdb for examples how to sort your garbage
kdzoha
November 26, 2024, 10:15pm
1528
I understand this may be out of the scope of auto entities. I use auto entities to populate this ālogbookā card.
- type: "custom:button-card"
template: card_title
label: "Automations"
- type: custom:auto-entities
card:
type: "logbook"
hours_to_show: 12
square: false
filter:
include:
- domain: automation
area: living_room
state: "on"
exclude:
- domain: automation
label: dimmer
- domain: automation
label: occupancy
sort:
method: name
Is there a way to use the auto-entitiesās filter as the filter for conditional cards?
For example if the filter comes out with 0 entities, donāt display the title āAutomationsā and donāt display the logbook card below eitherā¦
Read Docs about alternative card which is shown if a filter gives nothing.
kdzoha
November 26, 2024, 10:36pm
1530
I see that⦠the way I think this would workā¦
type: custom:auto-entities
card: <not sure what goes here if the list IS NOT EMPTY but I only want to show my custom title card>
card_param: <card_param>
entities:
- <entity>
- <entity>
filter:
template: <template>
include:
- <filter>
- <filter>
exclude:
- <filter>
- <filter>
else: <not sure what goes here if I just want an empty card>
unique: <unique>
sort: <sort_method>
I think maybe this is somewhat what I need. Iāll keep digging⦠thanks for the hintā¦
A simple way to show an alternative card if a filter gives an empty list:
type: custom:auto-entities
card:
type: entities
filter:
template: >-
{% set lights =
states.light|selectattr('state','==','on')|map(attribute='entity_id')|list -%}
{%- if lights|length != 0 -%}
{%- for LIGHT in lights -%}
{{
{
'entity': LIGHT,
'secondary_info': 'last-updated'
}
}},
{%- endfor -%}
{%- else -%}
{{
[
ā¦
Yes, but this is a rather advanced staff, have not proposed it.
teskanoo
(Teska Noo)
November 27, 2024, 7:36am
1532
I think the if you use a Jinga macro template to provide the entities to your auto entities template, you can use that same macro to provide account to a conditional card.
Why cant i regex multiple groups?
Iād preferrable filter by floor, but that is a too big hassle so Iām trying to filter by three light-groups i have on a specific floor, but this doesnt work, anyone got a clue?
filter:
include:
- domain: light
group: "/light.group_[stuelys|kontorlys|kjokkenlys]/"
options:
type: tile
features:
- type: light-brightness
card:
square: false
type: grid
columns: 2
show_empty: true
card_param: cards
Use https://regex101.com/
Untested:
"/light.group_(?:stuelys|kontorlys|kjokkenlys)/"
henning_wo
(henning_wo)
November 27, 2024, 7:11pm
1535
Hi, is there a possibility to populate the entities like this:
foo:
- switch.power_outlet_1
- switch.power_outlet_2
instead of
foo:
- entity: switch.power_outlet_1
- entity: switch.power_outlet_2
In the docs itās specified to only work the seconds way, but maybe there is a workaround or even a fork with this feature.
henning_wo:
populate the entities
Populate there?
Elaborate please.
henning_wo
(henning_wo)
November 27, 2024, 7:32pm
1537
Okay maybe I way a little too vague. My fault . The following screenshot shows how the entities are inserted into the card, in this example the scheduler-card .
Here the entities are inside the key āincludeā as a list of strings instead of a list of objects with āentityā, which is normally the case in for example the entities-card.
I hope this explains a bit better what I need.
Also here is the complete card if that helps:
type: custom:auto-entities
card:
type: custom:scheduler-card
tags: []
exclude: []
discover_existing: false
title: false
time_step: 1
display_options:
primary_info: default
secondary_info:
- relative-time
- additional-tasks
icon: action
sort_by:
- state
- relative-time
show_header_toggle: false
filter:
include:
- label: power-socket
domain: switch
options:
- this.entity_id
exclude: []
show_empty: true
card_param: include
So, AE gives
include:
- entity: sensor.x
- entity: sensor.y
and your card needs
include:
- sensor.x
- sensor.y
Right?
Try using a ātemplateā option of AE to fill the āincludeā option as needed.
(or ask the scheduler-cardās author to add āentityā keyword as optional)
henning_wo
(henning_wo)
November 27, 2024, 8:02pm
1539
What exactly do you mean by ātemplateā?
I tried a bit with the options of the filters but that just adds more keys next to the āentityā key which I dont want
Well I looked at the repo and saw about 100 open issues and the last release/commit is also a bit older so itās maybe not really maintained anymore but didnāt look deeper into the issues.
Was just wondering if anyone got an idea or even a fork with this already
henning_wo:
template
This is an option of auto-entities, check Docs.
henning_wo
(henning_wo)
November 27, 2024, 8:55pm
1541
As I understand this, itās just another way to filter, which leads to the same problem still outputting ā- entity: foo.barā, atleast thatās what the second last of these examples got me when I tested it
Hmm, you are right:
Unfortunately, there is no option in AE to omit/replace the āentityā wordā¦
What might help you - lovelace_gen.
henning_wo
(henning_wo)
November 27, 2024, 10:24pm
1543
Ildar_Gabdullin:
lovelace_gen
Thanks. This actually looks very helpful as Iām currently experimenting with getting my dashboard more dynamic