I am trying to populate the entities with filter: template: but I would like to change the display name of each entity based on their entity_id. It seems like something using options: as in this solution. It just seems like options: won’t work with filter: template:. I am open to any approach to solve this problem.
Basically I am trying to display all the settings I have configured by room, or by behavior (motion light activation, circadian/adaptive lighting, etc.) but I have to display the input_boolean/input_select/input_switch with a different name for each of these configuration methods. When showing settings by room, I need to display the behavior as the display name of the settings entity. When showing settings by behavior, I need to display the room as the display name of the settings entity.
I created this template which gathers the data I need into lists, but I’m not sure what the best way to turn this into the display I am aiming for.
{% if states('input_select.settings_behavior') == "Motion Activation" %}
{% set behavior_entity_type = 'input_boolean' %}
{% set behavior_regex = '\'input_boolean\.((?!motion_lights)[^\'])+\',?' %}
{% elif states('input_select.settings_behavior') == "Natural Lighting" %}
{% set behavior_entity_type = 'switch' %}
{% set behavior_regex = '\'switch\.((?!adaptive_lighting_(?!adapt|sleep))[^\'])+\',?' %}
{% endif %}
{% set entity_list = (states[behavior_entity_type] | map(attribute='entity_id') | list | regex_replace(behavior_regex)) %}
{% set area_list = (entity_list | regex_replace('input_boolean.motion_lights_')) %}
{{ [entity_list, area_list] | regex_replace('"\[','[') | regex_replace('\]"',']') }}
I also tried using config-template-card to create do the switching, but I’m having trouble getting this working.
The only other way I can think to do it is with a very big custom:state-switch card containing a bunch of auto-entities cards. Which seems like a headache to come back to if I need to add more settings.
First of all, a huge thank you to @thomasloven for this fabulous card.
I confess to not having read all the posts, so please bear with me if my question has already been answered.
I would love to be able to sort by the most recent entry. Is that already possible?
I do not know any exposed property expressing a “creation time” for entity.
If it is not present - then it is not possible to sort by it.
So, first find out about this property.
Could someone help me I can NOT figure out how to make the background transparent on this card. With my code as is the background is transparent when in the editor. soon as I save it does not show as transparent.
But does it still work after you save and return to the dashboard? Soon as I do it reverts to the default theme even with red. This is really messing with me as even when i go back to “edit” it will blink red and go back to the dark mode default. I have MANY cards on my setup and this one is the ONLY 1 that wont go transparent.
I do not see any flickering.
I tested this case with a card which is not placed inside some other card.
Could you provide a whole code for your card?
Also, I am using a default Lovelace theme.
OMG, you were 100% right! I moved it to a stand-alone card and BOOM it worked! HTF I did not try that months ago I don’t know… Thank you so much go’s to show some times you just need a kick in the but. haha
Hey, is there a way to always show the newest “entry”, i.e. just showing one entry? Using layout cards it is supposed to always show the media control card of the device it is currently playing on, but due to the Spotify Integration, there are always two - The normal spotify one, and then the one from the device it is actually playing on.
I have tried to find an answer, but there is already so much going on here, so maybe it was already answered:
Would it be possible to extend it to allow adding more complicated stuff in the “card” parameter?
I am working on an integration that will show the status of my packages. The entities have some attributes that I would like to show with the entity-attributes-card (GitHub - custom-cards/entity-attributes-card: Entity Attributes, but I am assuming this applies to a lot of other cards as well).
I have tried using the template approach, but basically I am limited to 1 line per entity, which is too limiting.
This is how 1 card looks like, I would like to have it repeated for everything the auto-entities card includes and have the possibility to use some kind of placeholders for the entity
I am stuck with the "sort::count" property.
The property is supposed to reduce a number of displayed items.
But it does not work for me - look at this list of sensors with "unknown" state:
Under the Sort: count: Can a variable be used instead of a static number. I would like to use an input number into the count. This way I can change how many shoe in the card.
sort:
method: state
numeric: true
count: 3
Instead like this
count: “{{states(‘input_number.daystoshow’)}}”
Doesn’t seem to work
Hey all. Any idea why this filter is including items with the status “Replace”, but not those with the status “yellow” or “off”? I’ve double and triple checked in the dev tools state to make sure I was using exactly the right string as what I defined, but it just seems to like some and not others.