Card-mod questions #151
Unanswered
Schoultzies
asked this question in
Q&A
Replies: 1 comment 2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following card setup.
type: entities
entities:
restrictions:
pin:
code: 1234
text: Enter Pin Code
duration: 20
card:
type: custom:paper-buttons-row
base_config:
style:
button:
font-size: 0.9rem
background-color: rgba(62, 65, 75, 0.6)
border-radius: 15px
"--mdc-icon-size": 18px
buttons:
- entity: switch.adguard_home_parental_control
state_icons:
"off": mdi:magnify
"on": mdi:magnify-expand
state_styles:
"on":
button:
background-color: rgba(13, 160, 53, 0.3)
color: rgba(20, 200, 60, 1)
"off":
button:
background-color: rgba(62, 65, 75, 0.6)
color: rgba(132, 135, 145, 1)
name: Parental Control
tooltip: false
layout: icon_name
tap_action:
action: call-service
service: switch.toggle
service_data:
entity_id: switch.adguard_home_parental_control
style:
button:
height: 40px
width: 110px
margin-left: auto
margin-right: auto
margin-bottom: 10px
- entity: switch.adguard_home_protection
state_icons:
"off": mdi:lock-open-variant-outline
"on": mdi:lock-outline
state_styles:
"on":
button:
background-color: rgba(13, 160, 53, 0.3)
color: rgba(20, 200, 60, 1)
"off":
button:
background-color: rgba(62, 65, 75, 0.6)
color: rgba(132, 135, 145, 1)
name: AdGuard Protect
tooltip: false
layout: icon_name
tap_action:
action: call-service
service: switch.toggle
service_data:
entity_id: switch.adguard_home_protection
style:
button:
height: 40px
width: 110px
margin-left: auto
margin-right: auto
margin-bottom: 10px
card_mod:
style: |
:host {
--restriction-blocked-lock-color: red;
--restriction-success-lock-color: green;
--restriction-invalid--color: orange;
--restriction-lock-icon-size: 22px;
--restriction-lock-margin-left: calc(50% - 18px);
--restriction-lock-row-margin-top: 10px;
}
WRT card-mod, --restriction-blocked-lock-color , --restriction-success-lock-color: green, --restriction-lock-row-margin-top: 10px have no effect.
--restriction-invalid--color: orange worked before the last update (1.2.18). Also, lock icon now dissapears when locked, before the update, it remained when locked.
Have also tried adding to my theme, same result. Am I doing something wrong?
Many thanks...
Beta Was this translation helpful? Give feedback.
All reactions