chrjs
March 6, 2025, 8:26am
1
Hi, after the current version (2025.3) brought more new features to the Tile Card, I wanted to start migrating my Mushroom Cards to Tile…
But I already have a problem understanding the first Light Card.
Is it not possible to hide the brightness slider when the lamp is not switched on?
Top: mushroom light card
Bottom: Tile card
features:
- type: light-brightness
type: tile
entity: light.buero_bars
features_position: bottom
vertical: false
name: Büro Bars
hide_state: true
show_entity_picture: false
If its not possible without any addons, thats fine, but then I’ll just keep the mushroom cards…
Cheers
I agree, I’d like this too, found this feature request:
Did you ever get this functionality figured out?
2 Likes
chrjs
March 6, 2025, 9:05am
3
Ah … damn. I didn’t found anything to this. Thanks!
I wanted to migrate my Mushrooms cards to the Tile one but just like you, without this hide option, I’ll not migrate.
This is an option with card_mod
features:
- type: light-brightness
type: tile
entity: light.night_stand
vertical: false
hide_state: false
features_position: bottom
card_mod:
style:
hui-card-features $:
hui-card-feature $:
hui-light-brightness-card-feature $: |
ha-control-slider {
display: {{ 'none' if is_state(config.entity, 'off') else 'block' }}
}
1 Like
LiQuid_cOOled:
features:
- type: light-brightness
type: tile
entity: light.night_stand
vertical: false
hide_state: false
features_position: bottom
card_mod:
style:
hui-card-features $:
hui-card-feature $:
hui-light-brightness-card-feature $: |
ha-control-slider {
display: {{ 'none' if is_state(config.entity, 'off') else 'block' }}
}
Good start. The problem is that the vertical space of the card stay the same with or without hiding
I am not sure why you are getting different results. The code works as I described
The card looks like that for you with the exact code above?
When I add a card with that exact code just the entity replaced to a valid entity in my home, the card will always take up 2 rows no matter what I do. Same if I manually define column and row values as well:
Code exactly as is, only entity updated:
With Column and Row defined:
Hasn’t been too long so I’m not sure if something has changed with the tile card or card mod since your post, but definitely possible.
Would really love if this was a native option like with mushroom cards lol, would love to switch over! Either this or mushroom needs to add the option to have a different tap action depending on if you click on the card or on the icon like the tile cards have now. Stuck in between the 2!
That code will not work with the Sections Dashboard.
Jaw818
(Jake)
April 7, 2025, 7:25pm
10
This should work for you!
type: tile
entity: light.living_room_lights
features_position: bottom
vertical: false
features:
- type: light-brightness
card_mod:
style:
hui-card-features $:
hui-card-feature $:
hui-light-brightness-card-feature $: |
ha-control-slider {
display: {{ 'none' if is_state(config.entity, 'off') else 'block' }}
}
.: |
ha-card.type-tile {
height: {{ '50%' if is_state(config.entity, 'off') else '100%' }};
}
1 Like
Nice addition… No need for .type-tile
card_mod:
style:
hui-card-features $:
hui-card-feature $:
hui-light-brightness-card-feature $: |
ha-control-slider {
display: {{ 'none' if is_state(config.entity, 'off') else 'block' }};
}
.: |
ha-card {
height: {{ '50%' if is_state(config.entity, 'off') else '100%' }}!important;
}
Thank you both! (+ LiQuid_cOOled )
I ended up going with a solution using state-switch , but this is great to know, still figuring a ton out about Card-Mod.
Doesn’t really affect me now, but only issue I run into with this specifically now is that the actual card frame itself is still the full 2 row height even though it’s only displaying 1 row height, so you can’t place cards directly on top of each other without a gap while they’re off:
If you place the cards in a vertical-stack, that issue will go away. It also doesn’t require the quoted additional card mod code above.
type: vertical-stack
cards:
- features:
- type: light-brightness
type: tile
entity: light.night_stand
features_position: bottom
vertical: false
card_mod:
style:
hui-card-features $:
hui-card-feature $:
hui-light-brightness-card-feature $: |
ha-control-slider {
display: {{ 'none' if is_state(config.entity, 'off') else 'block' }}
}
- features:
- type: light-brightness
type: tile
entity: light.night_stand
features_position: bottom
vertical: false
card_mod:
style:
hui-card-features $:
hui-card-feature $:
hui-light-brightness-card-feature $: |
ha-control-slider {
display: {{ 'none' if is_state(config.entity, 'off') else 'block' }}
}
grid_options:
columns: 12
rows: auto
OFF
ON
1 Like