so I have a ācustom:button-cardā,
it shows me an LED afterwards.
in there is a ācustom_fieldā with another ācustom:button-cardā.
this shows my motion sensor.
if the status now changes to āonā, i would like the icon to change as well.
in my code, however, only the icon changes when I switch the āswitch.tp_link_01ā on/off
the only thing that āworksā is āchange_colorā. The binary_sensor does that correctly.
But as I said: changing the icon doesnāt work
type: custom:button-card
entity: switch.tp_link_01
name: Garage
icon: >-
[[[ if (entity.state == "off") return "mdi:garage"; else return
"mdi:lightbulb" ]]]
show_state: true
size: 100%
styles:
card:
- border-radius: 10%
grid:
- grid-template-areas: '"l i i i temp" "l i i i s" "l i i i s" "n n n n n"'
- grid-template-columns: 1fr 1fr 1fr 1fr 1fr
- grid-template-rows: 1fr 1fr 1fr 1fr
custom_fields:
licht:
- align-self: start
- justify-self: end
- padding-right: px
custom_fields:
licht:
card:
entity: binary_sensor.presence_12
icon: >-
[[[ if (entity.state == "off") return "mdi:car"; else return
"mdi:security" ]]]
layout: vertical
name: []
state:
- value: 'on'
styles:
state:
- color: green
card:
- filter: drop-shadow(0 0 1.0rem rgb(243,156,15))
- border: 0px
icon:
- color: rgb(255,0,0)
- value: 'off'
styles:
state:
- color: red
name:
- color: rgb(80,80,80)
icon:
- color: green
- icon: mdi:security
type: custom:button-card
hold_action:
action: more-info
state:
- value: 'on'
styles:
state:
- color: green
card:
- filter: drop-shadow(0 0 1.0rem rgb(243,156,15))
- border: 0px
- value: 'off'
styles:
state:
- color: red
name:
- color: rgb(80,80,80)
icon:
- color: rgb(80,80,80)
and the background-color-off is using primary color, I have a conflict with the header-toggle which uses the same color, and even with the background of the toggle which is also invisible.
Can we mod the settings for the header-toggle independently from any other toggle in the card?
Thanks for the investigations. Very interesting. I double-checked all them and saw the same behavior.
Card 1.
Same behavior and I expected the same as you to see.
Donāt understand either. The first is empty, the second has the references. Double-Check with $0._input_styles and $0._styleChildren.
Card 2.
Same behavior and I expected the same as you to see.
see above.
This seems to be the first one from above. The empty one.
Card 3.
Same as 2. Expected the same and
in every div are the āempty onesā.
Card 4.
Dito, but then I saw another āemptyā one coming and going on. Had this in other places in the examples above already, but thought I only missed to look correctly.
hui-generic-entity-row` level. Sometimes it was there, sometimes not. Confused.
So in general the syntax was, what I expected and same as your expectations. I Onle wonder how to address e,g, the sevond div already from there.
And now Card 5.
O.k. Now I get what is should or could be behind the leading $. Thanks for this hint.
Same as above. Iām not sure if it should be there and it is again empty.
Perhaps there is a glitch or hick up with such entries and the root cause for the ones and duplicates in card 1-4 as well. Perhaps Thomas can check or explain?
not sure if this is for button-card or here, but since I am trying to card_mod, thought it best to post here.
Goal: scroll a set of button-cards, which are 4 in a row, full width of a card.
Ive almost got it as I want, with one annoying exception.: there scrollbar is positioned outside of the card, and showing underneath the card next to it:
Not sure if I understood or you didnāt my question.
My question was Card 2-4 in notation as there, but make the second sun red, because it is the second hui-text-entity-row with nested hui-generic-entity-row.
Yes, I can define on entity level, but here I was wondering to get there from parent as well.
Can anyone point me in the right direction here? I want to place several cards (custom button, etc) on a grid layout of some sort, and then style the background of that layout and make the child cardsā background transparent. Quite easy to do in straight html and css, but seems impossible here.
Iām pretty sure, that in this example some things are not working (without card_mod) or I didnāt get the approach. Or you did some copy&paste&remove.
Marius, I like this, especially the background. I did look at the weather cards. I am trying to put together a kiosk āview/panelā that would have 6 of these cards in one view; showing weather from cities with family. The problem is all that information is tough to get on one screen. So, I wanted to hide some, making it available through a more-info dialogue (especially with the weather alerts - a link to the entire alert is my goal there). Then there is the mobile phone display to deal with later on. I will keep posting my progress. You and @arganto have given me some hope. Thanks so much. I am sure I will be back.