lovelace-card-mod
lovelace-card-mod copied to clipboard
Little help to integrate with paper-button-row
Hello Folks,
Not an issue, but a cry for help, hope its not a problem.
I'm trying to manipulate a paper-button-row custom card.
I have an AirConditioner which I control with paper-buttons: turn on for time period, or off.
Also I have an automation to control it based on a preset.
I figured, if the automation is ON, i do not want anyone to mess around with the manual settings, so I disabled them with card-mode.
Problem, is I cannot disable only the paper-buttons, but the whole entity-row, with the icon (visual issue) and the title, which means I cannot access the state history and such.
Could someone help me please to apply my mods only on the paper-buttons?
My code would be this so far:
type: entities
entities:
- entity: automation.toohotinhere
card_mod:
style: |
:host {
{% if is_state('automation.toohotinhere','on') %}
--paper-item-icon-color: var(--disabled-text-color);
pointer-events: none;
{% endif %}
}
extend_paper_buttons_row:
position: right
base_config:
style:
button:
background-color: lightblue
border-radius: 4px
padding-top: 2px
padding-right: 6px
padding-bottom: 2px
padding-left: 5px
margin-right: 5px
border-style: solid
border-width: 2px
font-weight: 500
buttons:
- entity: asd.asd
layout: icon|name
name: auto
style:
button:
width: 100%
background-color: none
border-style: none
border-width: 2px
font-weight: 500
justify-content: flex-start
ripple:
display: none
- name: 30M
tap_action:
action: call-service
service: script.KlimaFor30Script
- name: 1H
tap_action:
action: call-service
service: script.KlimaFor1hScript
- name: 2H
tap_action:
action: call-service
service: script.1656525217310
- name: 'OFF'
tap_action:
action: call-service
service: script.offklima
Not an issue, but a cry for help, hope its not a problem.
Please ask these questions in a dedicated card-mod community thread