I have a bunch of sensors named sensor.dals_*. Each of these have a attribute called script. I want to call that script when I click on the sensor in the lovelace card.
Why not use grid card with column: 3 as option instead of vertical+horizontal? And then decluttering card as the card inside it using filter, which will give a grid with 3 button cards horizontally.
yes, I could do that too, my config is from before the grid card
will try and rebuild that, might be better. thanks for the suggestion.
but my main question is not about the layout, it is about the selection of the entities, and how to use the object_id in the auto-entities cards filter / decluttering-card
The sense of the code is just to visualize what my words were talking about
Should be much easier to read meanwhile. Now I´m sure the help will come shortly
There are three lists inside.
In your case you will probably get an empty card since you do not have entities sensor.ac68u_snmp_mem*, sensor.cleargrass_1_*, sensor.cleargrass_2_*.
As I need a title for each list (for each custom:auto-entities) I think I need to put them inside an entities card. This is what you could (have) see(n) in my initial post with full yaml code (200 lines, you remember :-D).
TITLE FOR WHOLE CARD
- Subtitle (Title of auto-entities card)
... List elements
... List elements
...
- Subtitle (Title of auto-entities card)
... List elements
... List elements
...
- Subtitle (Title of auto-entities card)
... List elements
... List elements
...
Where´s the difference in your code snippet compared to mine?
You use single entities within ONE auto-entities card, I need to nest several of them because I visually combine several lists to one card.
Again, main question: How can I hide the whole card, if none of the auto-entities cards inside that card show anything?
Surely you may put "type: section" rows before each list - but then only these rows are displayed if lists are empty - and then the card will be displayed too since the WHOLE list is not empty.
…maybe there are other ideas too (like putting all list elements into one group and use condition card to show the card at all). So there are ways, it´s just they are pretty/unnecessary complicated.
Why can auto-entities not realize there´s no element (consisting of nested, empty sub auto-entities) @thomasloven? This is working on the first level, so just wondering.
I have a question. I want to achieve somewhat simple setup. I want to have fold entities auto populated with auto entity like here:
But with toggles for the sections.
I played with static fold entity and was able to get what’s in the screenshot but I don’t know how to use auto-entity to get entities for the fold row.
I know I could have the toggle for the section if I would for example create light group with all entities for area but I was thinking if there is a way to do it without this step.
I really love the idea of auto-entities and this is an awesome card!
I was creating a card in another thread using apexcharts-card and custom-config-card to create a dynamically changeable plot Dynamic selection.
The only downside being, that I have to manually define the input_select.sensors_to_show. I think this is were auto-entities could come in and make this far more convenient and future proof.
Would it be possible to use auto-entities to define variables on-the-fly?
My idea was:
Create an input_select with the includes for auto-entities (e.g. ‘area’, ‘sensors’, ‘devices’ etc.). These are static anyway and do not change when adding new devices.
Use this input_select as include parameter for auto-entities. Auto-entities would then create a list of e.g. all areas
Create a variable of the auto-entities list and forward it to the next card.
Would this be possible?
My current code is
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_select.days_back_to_show
name: Number Of Days To Show
- entity: input_select.sensors_to_show #this is what auto-entities would need to supply
name: Select Sensor
- type: custom:config-template-card
entities:
- input_select.days_back_to_show
- input_select.sensors_to_show
variables:
sensor: states['input_select.sensors_to_show'].state
span: states['input_select.days_back_to_show'].state+'d'
days: |
-states['input_select.days_back_to_show'].state+'d'+'1d'
card:
type: custom:apexcharts-card
graph_span: ${span}
span:
start: day
offset: ${days}
series:
- entity: ${sensor}
stroke_width: 2
group_by:
func: raw
EDIT:
I think it should be something along the lines of this, but I am not sure how auto-entities passes on the entities it uses, so I am not sure if it can populate a series.
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_select.days_back_to_show
name: Number Of Days To Show
- type: custom:auto-entities
card:
type: custom:config-template-card
variables:
sensor: states['input_select.sensors_to_show'].state
span: states['input_select.days_back_to_show'].state+'d'
days: |
-states['input_select.days_back_to_show'].state+'d'+'1d'
card:
type: custom:apexcharts-card
graph_span: ${span}
span:
start: day
offset: ${days}
series:
# - entity: ${sensor} this would need to be populated
stroke_width: 2
group_by:
func: raw
#duration: 1min
entities:
- input_select.days_back_to_show
filter:
include:
- domain: sensor