Hi,
could someone help me how to remove the icon (and its space)? Thanks
type: custom:fold-entity-row
head:
entity: sensor.warehouse
name: Warehouse
open: false
state_color: true
entities:
- entity: light.light1
- entity: light.light2
- entity: light.light3
This should be enough to do it!
type: custom:fold-entity-row
head:
entity: sensor.warehouse
icon: none # Added this line
name: Warehouse
layout: horizontal
open: false
state_color: true
entities:
- entity: light.light1
- entity: light.light2
- entity: light.light3
PS: This is a much more graceful solution than custom:expander-card
, which is what I was using - will transition to this now!
1 Like
Yes, I found this option.
I didnât express myself well, I meant without an icon and without the space it occupies, moving the text to the left.
pacmanforever:
layout: horizontal
This option does not belong to fold-entity-row.
And this is misplaced:
state_color: true
card-mod thread
1 Like
right, but it isnât important (copy/paste error)
Ildar_Gabdullin:
And this is misplaced:
Without this the card not show states (checked)
1 Like
Ah sorry, I see!
Well in that case, @Ildar_Gabdullin âs amazing posts will help you:
Styling Entities card.
(including some special row elements - button, section, divider)
NOTE:
Do not forget to add a "card_mod:" keyword before "style:" (new in card-mod 3).
Colored background & rounded corners - can be easily achieved by using "--ha-card-background" & "--ha-card-border-radius" variables:
[image]
type: entities
title: Title
entities:
- entity: sun.sun
style: |
ha-card {
--ha-card-background: orange;
--ha-card-border-radius: 14px;
}
Using background image:
TâŚ
Go there and search for Hiding an icon or a state:
Youll find code like this:
type: entities
entities:
- entity: sun.sun
card_mod:
style:
hui-generic-entity-row:
$: |
state-badge {
display: none;
}
card-mod
is super useful. I have this post bookmarked whenever I am doing something outside of normal Home Assistantâs design rules:
1 Like
Actually, this is not the BEST way - may cause decreasing a rowâs height.
Depends on a particular cardâŚ
1 Like
What would you recommend then for an entities card?
Same) check it 1st, and then decide if you need another way.
You are right.
Although âstate_colorâ is not mentioned in Docs and was supposed to be used ether:
â in âgroup_configâ;
â in âheadâ;
â in entities for some entity/entities,
it is present in a source code & may be defined on a ârootâ level of the card.
1 Like
Thanks to both of you, this is the solution:
type: custom:fold-entity-row
head:
entity: sensor.warehouse
name: Warehouse
card_mod:
style:
hui-generic-entity-row $: |
state-badge {
display: none;
}
open: false
state_color: true
entities:
- entity: light.light1
- entity: light.light2
- entity: light.light3
1 Like
drew-kun
(Drew Kun)
October 15, 2024, 11:51pm
13
I know itâs old, but there is a âsectionâ head type now (may be useful for somebody):
- type: custom:fold-entity-row
padding: 0
open: true
group_config:
secondary_info: last-changed
head:
type: section
label: Occupancy Statistics
entities:
Processing: Screenshot 2024-10-15 at 16.45.07.pngâŚ
Sorry, what do you mean by ânowâ? This is an old thing (at least from 2020 when I started using HA)