Great stuff.
I am running into an issue using an exclude in a filter list for an attribute
type: custom:auto-entities
card:
square: false
type: grid
columns: 1
card_param: cards
filter:
include:
- domain: binary_sensor
entity_id: '*_rf_*'
attributes:
tamper: 1
options:
type: tile
icon: mdi:antenna
- domain: binary_sensor
entity_id: '*_rf_*'
attributes:
lowbatt: 1
options:
type: tile
icon: mdi:antenna
exclude:
- domain: binary_sensor
entity_id: '*_rf_*'
attributes:
Loopnr: 0
sort:
method: friendly_name
reverse: false
The exclude is completely ignored, any idea what i am doing wrong?
Silly me, figured it out, the attribute name is all lower case.
Loopnr: 0 ā loopnr: 0
Hi Ildar. I hope you can still remember this post from Nov. 2023:
It was about completely hiding/deleting the RUN/CANCEL actions. Not only with " " to adapt the action_name.
I would be very interested in your solution with card_mod. Would you share it with us?
Iāve tried countless code snippets from your card_mod thread, but apparently there is something different inside auto-entities than in the normal entities card.
Thank you in advance.
Post the code that you have that gets you your screenshot.
Thank you for your response. Itās not my Screenshot, it is from this post:
But i have the same question:
Here is my code:
type: custom:auto-entities
card:
type: entities
show_header_toggle: false
filter:
include:
- entity_id: scene.*
state: 'on'
options:
action_name: 'on'
secondary_info: last-changed
sort:
method: friendly_name
reverse: false
show_empty: false
With the parameter action_name i manipulate the action button. But i would like to hide the complete action(button).
that wont help you anyways as scenes are no longer āonā but they have a timestamp as state
you can see that if you add type: simple-entity
which takes away the button and shows the state of the scene
Please do not concentrate on the filter. I know the on/off problem with scenes. The code is no longer up to date, I have adjusted the include in the meantime. The entities are listed, thatās not my problem.
I also tried simple-entity, but especially in scenes the state is so long (date, time, etc.). Or do you know a way to not display the state with card_mod?
Hi!
After the update to 2024.7, the custom:auto-entity card, when there are no elements and it should be hidden, leaves an empty space, here is an example of 3 cards (empty) in a vertical stack, is there any way to fix this?
here you go:
type: custom:auto-entities
card:
type: entities
show_header_toggle: false
card_mod:
style:
hui-scene-entity-row$: |
mwc-button {
display: none;
}
filter:
include:
- entity_id: scene.*
options:
action_name: 'on'
secondary_info: last-changed
sort:
method: friendly_name
reverse: false
show_empty: false
Yeah! Thatās it! Thank you so much. Finally. Youāre the best.
You could have found that yourself if you followed the guidelines and examples in the main post in card-mod thread
Weāre here to help, but that is not always the same as providing final solutionsā¦ā¦
And maybe you should use another card all together as this does look a bit silly now. Why would you list scenes if not to enact them?
Any chance you post a minimal card config so we can see what you do?
Oh believe me, I tried. As you can see from my first question in the card-mod thread, which was over 2 months ago. Iām someone who is just searching and trying to help myself. But I just couldnāt find it. And exactly the hint with
hui-scene-entity-row$: |
i couldnāt find it there. And I am very grateful to Dimitri for helping me. I donāt understand whatās bothering you now? What did I do wrong?
For me, the result on my dashboard doesnāt look silly. The names of my scenes are much longer than in Dimitriās example, the action buttons etc. even have these names cut off. Now it looks good. BTW: I use this card to see which scenes are currently active.
But again, so that I can do better: what did I do wrong with my question that bothered you so much?
please dont get me wrong, I am not bothered the slightest, and you did nothing wrong.
I believe you could have given it a bit more effort trying to find that correct path in the dom, in stead of simply trying
because that illustrates you didnt start at the root of the challenge: try to find the correct dom path (which I am aware can be frustrating sometimes, I had that same experience the other day on a silly button myself)
Dimitri has solved your problem now, but will you be able to do it yourself next time?
Also, more importantly, I just dont think you will get what you want:
youāll get a list of names, and secondary info of the timestamp. Not a list of currently active scenes.
So, in al honesty, I hope you come back here, and with aid of this fine community get a better approach to reach your goal
Okay, then Iām glad that everything is good between us. I donāt know if I could get there on my own in the future, Iām still at the beginning with HA. And sometimes, as a beginner, you need support in the right direction.
But one more thing: Yes, it is exactly what is shown. A list of all active scenes. I use python_script.set_state in automation to set a custom attribute to the scenes when they are active or not active. The conditions are numeric_state of the attributes of the corresponding entities. And trigger the activation of the scene or attribute changes of the corresponding entities.
But none of that belongs in this thread anymore. So see you soon and all the best.
Guess this is how it worked even a year ago.
About a week ago I demonstrated another person on GitHub same behavior on 2023.x setup.
Itās strange, before the update to 2024.7 there was no such problem, or it was almost unnoticeable, the indent was a couple of extra pixels, but now the indent is at least 15 pixelsā¦
Sure:
type: vertical-stack
cards:
- type: custom:button-card
....
- type: custom:auto-entities
show_empty: false
card:
type: entities
filter:
include:
- domain: sunn
- type: custom:auto-entities
show_empty: false
card:
type: entities
filter:
include:
- domain: sunn
- type: custom:auto-entities
show_empty: false
card:
type: entities
filter:
include:
- domain: sunn
- type: custom:auto-entities
show_empty: false
card:
type: entities
filter:
include:
- domain: sunn
- type: custom:mini-graph-card
....
I did say āminimalā with a purposeā¦
you cant expect the community to test your config to the minimal state it show the issue you experience.
please strip everything from that config to the bare minimum still showing your problem in the Dashboard
also, tell us what view you are using.
if it is the Sections view, it might very well be that causing more space than you expect. Itās still experimental and has several flukes we hope will get ironed out