Hide state in entity card

Hi, I’m using entity cards to display a list of door/windows sensors. Now the state badge works fine for me. There is actually no need for each entity to display “closed”. Is there a way to hide that? Not build in but for example with card_mod. I tried to hide the element with “display: none !important”. But seems like I missed to tag the correct HTML element as nothing happened :slight_smile:

Any help is appreciated. Thanks!

image

Check out this thread

Not sure why you want to go the hard route and use card_mod when there is a built in way to handle this. I know you said you didn’t want a built in way, but I’ll mention it anyway. It seems like it would be WAY more straightforward than modding the CSS.

There is a type of entity row called conditional that you can use to show or hide an entity in an entities card based on, well, conditions (including the state of the entity).

Hi, I don’t want to hide the entity. Only the state. But not the badge and name. My understanding with condition I would hide the whole entity, isn’t it?

Thanks for the link. Adding below for each entity did the track

card_mod:
style:
hui-generic-entity-row $: |
.text-content:not(.info) {
display: none
}

1 Like

Yes, that would hide the whole entity. Sorry about that. I must have misread your initial post on what you were trying to do. Glad you found a solution.