I have noticed that when the slider-entity-row is combined with a conditional entity row the state values is not displayed.
type: entities
entities:
- type: custom:slider-entity-row
entity: input_number.download_speed_threshold
full_row: true
max: 50
step: 1
card_mod:
style: |
.state {
font-weight: 600;
font-size: 120%;
}
- type: conditional
conditions:
- entity: input_number.download_speed_threshold
state_not: '0'
row:
type: custom:slider-entity-row
entity: input_number.download_speed_threshold
full_row: true
max: 50
step: 1
title: Sliders
show_header_toggle: false
This is how it looks like.
However if I set the hide_state
parameter, the state is shown.
type: entities
entities:
- type: custom:slider-entity-row
entity: input_number.download_speed_threshold
full_row: true
max: 50
step: 1
card_mod:
style: |
.state {
font-weight: 600;
font-size: 120%;
}
- type: conditional
conditions:
- entity: input_number.download_speed_threshold
state_not: '0'
row:
type: custom:slider-entity-row
entity: input_number.download_speed_threshold
full_row: true
hide_state: false
max: 50
step: 1
card_mod:
style: |
.state {
font-weight: 600;
font-size: 120%;
}
title: Sliders
show_header_toggle: false
The state is shown on the conditional row. However, the formatting is done correctly.
By playing around with card-mod, I was able to format the state value for the conditional row.
type: entities
entities:
- type: custom:slider-entity-row
entity: input_number.download_speed_threshold
full_row: true
max: 50
step: 1
card_mod:
style: |
.state {
font-weight: 600;
font-size: 120%;
}
- type: conditional
card_mod:
style:
slider-entity-row$ div: |
.state {
font-weight: 600;
font-size: 120%;
}
conditions:
- entity: input_number.download_speed_threshold
state_not: '0'
row:
type: custom:slider-entity-row
entity: input_number.download_speed_threshold
full_row: true
hide_state: false
max: 50
step: 1
title: Sliders
show_header_toggle: false
Just thought of sharing this.