georgelza
(George)
January 30, 2021, 8:04am
1358
guys, how can i check if I’ve installed the module correctly. I went into my ssh terminal, went into the config directory, created a www directory, cd’d into that and ran the git clone command.
I’m now trying to add the bit from style… onwards (intend is to hide the keypad)
type: alarm-panel
entity: alarm_control_panel.master_alarm_panel
name: Master Panel
states:
- arm_home
- arm_away
- arm_night
style: |
#keypad, #alarmCode {
display: none !important;
}
kongo09
(kongo09)
January 30, 2021, 12:41pm
1359
I would like to modify the standard light
card for a dimmer with three goals:
eliminate the three dots for the more-info menu
make the background transparent
let the icon keep its color instead of changing with dim level / brightness
I managed to achieve the first two but I’m stuck with the third. Any advice?
type: light
entity: light.shelly_leo_dimmer
style: |
mwc-icon-button.more-info {
display: none;
}
ha-card {
background: none;
}
Inspecting the document, I can see that a filter:
on ha-icon-button
is responsible for the changing color. However, setting it to none
doesn’t seem to have an effect:
type: light
entity: light.shelly_leo_dimmer
style: |
mwc-icon-button.more-info {
display: none;
}
ha-card {
background: none;
}
ha-icon-button {
filter: none;
}
I feel like missing something obvious.
KTibow
(Kendell R)
January 30, 2021, 2:50pm
1360
The filter is responsible for the brightness; you also need to set color
.
kongo09
(kongo09)
January 30, 2021, 2:59pm
1361
I don’t think it is that easy. The following has no effect:
type: light
entity: light.shelly_leo_dimmer
style: |
mwc-icon-button.more-info {
display: none;
}
ha-card {
background: none;
}
ha-icon-button {
filter: none;
color: green;
}
kongo09
(kongo09)
January 30, 2021, 3:25pm
1363
Thanks, yes, that was it!
type: light
entity: light.shelly_leo_dimmer
style: |
mwc-icon-button.more-info {
display: none;
}
ha-card {
background: none;
}
ha-icon-button {
filter: none !important;
}
Thank you very much! I am wondering where I can put the Variable so that I can reuse it in other cards.
petro
(Petro)
February 3, 2021, 7:42pm
1366
Can you break down how you got to this selector? I tried to apply my selector knowledge this morning and did not get the same result (or a working result).
KTibow
(Kendell R)
February 4, 2021, 8:18pm
1367
Oh, that was an old post. Could you share what you came down to?
petro
(Petro)
February 4, 2021, 8:20pm
1368
I don’t remember what I originally had. But I’m wondering how you get the initial selector point. How did you know to use layout-card$
?
KTibow
(Kendell R)
February 4, 2021, 8:21pm
1369
That was the name of the card’s element.
petro
(Petro)
February 4, 2021, 8:23pm
1370
So where’s the $ come from, why is it at the end? Is that something new in the custom card?
KTibow
(Kendell R)
February 4, 2021, 8:25pm
1371
This was the old syntax:
style:
element-card:
$:
another-thing:
$: |
This is the new syntax:
style:
element-card$another-thing$: |
1 Like
Could you explain what means “the new syntax”, shall we use it from now, will it work everywhere?
parautenbach
(Pieter Rautenbach)
February 5, 2021, 8:37pm
1374
And to add to that: Will the old syntax stop working, or is the new syntax more like syntactic sugar?
KTibow
(Kendell R)
February 5, 2021, 8:51pm
1375
Could you explain your question more?
Ildar_Gabdullin:
shall we use it from now
If you want.
Ildar_Gabdullin:
will it work everywhere?
I don’t know, but in all of my uses so far it’s worked.
I think it will still work.
It does fix a problem with the old syntax that stopped you from shadow-rooting into an element inside of a shadow-root
1 Like
Please give me an example of this, I did not get the point, thank you!
KTibow
(Kendell R)
February 6, 2021, 1:59am
1377
This originally worked, then stopped working:
style:
element-card:
$:
another-thing:
$: |
When the new syntax came out, it worked.