Do not invent options ).
You may try using “custom:template-entity-row” for customizing/not showing a state.
Also, you may hide a state for a standard entity row by card-mod, there should be a ready example on the link I provided above.
I didn‘t invent „show_state: false“, I‘ve found it in other posts!
Can you give me a closer hint where to find that example?
Someone did not read Docs & posted smth, another guy took it “as is” - this is how fake news are spread)).
No, cannot, sorry, follow the link I gave you, it is there…
This option may belong to many cards - & may be absent for some card, it is normal.
Now I‘ve found that one…
…and it hides the state with this code:
type: entities
entities:
- entity: binary_sensor.alle_fenster
card_mod:
style:
hui-generic-entity-row:
$: |
.text-content:not(.info) {
display: none;
}
But when I add „ type: custom:fold-entity-row“…
type: entities
entities:
- entity: binary_sensor.alle_fenster
type: custom:fold-entity-row
card_mod:
style:
hui-generic-entity-row:
$: |
.text-content:not(.info) {
display: none;
}
… it’s back again:
How can I hide the state in this card type?
Do not have a ready example.
Go to card-mod thread → 1st post → that link
Find there examples for fold-entity-row & adapt for your needs.
I‘ve found a solution: I set the the type of the head and the entities to custom:multiple-entity-row and then can use card_mod for them:
- type: custom:fold-entity-row
open: true
head:
entity: binary_sensor.alle_fenster
type: custom:multiple-entity-row
show_state: false
state_color: true
card_mod:
style: |
:host {
--state-binary_sensor-on-color: red;
--state-binary_sensor-off-color: green;
}
entities:
- entity: binary_sensor.fenster_gastebad_contact
type: custom:multiple-entity-row
show_state: false
- entity: binary_sensor.fenster_bad_contact
type: custom:multiple-entity-row
show_state: false
- entity: binary_sensor.fenster_schlafzimmer_contact
type: custom:multiple-entity-row
show_state: false
- entity: binary_sensor.fenster_lilli_contact
type: custom:multiple-entity-row
show_state: false
- entity: binary_sensor.fenster_marie_contact
type: custom:multiple-entity-row
show_state: false
I have another question: Shouldn’t child elements of a group that are group parents themselves automatically be expandable as well (without listing them as entities)?
Like with this code:
type: entities
entities:
- type: custom:fold-entity-row
head:
entity: light.alle_lichter
I only get this, although all of the children are group parents:
Hi, I’m trying to move everything to the left, and I have to remove the icons, why doesn’t the style work?
type: custom:fold-entity-row
head:
type: section
label: Aperture
style: |
:host div#items {
margin: -100px -200px -200px -20px;
}
entities:
- entity: sensor.conteggio_aperture_posta_giornaliere_lettura
name: Aperture giornaliere
- entity: sensor.conteggio_aperture_posta_mensili_lettura
name: Aperture mensili
- entity: sensor.conteggio_aperture_posta_annuali_lettura
name: Aperture annuali
Firstly, left padding on this card is managed via an inbuilt setting. See the documentation for details on the padding:
key.
Secondly, it looks like you are trying to apply changes via the custom frontend component card-mod
: do you actually have it installed? And which version? Since version 3.4.0, all styles need to be under an explicit card_mod
key.
If wanting to remove the display of icons from entities for example, then you are probably better off asking this in the dedicated thread for card-mod, where you find detailed explanations and examples, especially in this excellent post by community member Ildar_Gabdullin.