-
Notifications
You must be signed in to change notification settings - Fork 275
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Checklist
- [x ] I updated the card to the latest version available
- [x ] I cleared the cache of my browser
Describe the bug
A clear and concise description of what the bug is.
as title, see also #1047 (comment)
Version of the card
Version: 5.1.0 dev 3
To Reproduce
This is the configuration I used:
- type: custom:button-card
template: button_picture
tooltip: Party
entity: input_boolean.home_mode_party
variables:
feest: >
[[[return entity.state === 'on'; ]]]
kleur: >
[[[ var rgb = states['light.home_theater'].attributes.rgb_color;
return rgb && variables.feest
? 'rgb(' + rgb + ')' : 'var(--background-color-off)'; ]]]
entity_picture: /local/modes/party.png
spinner: >
[[[ return variables.feest; ]]]
styles:
card:
- background: >
[[[ return variables.kleur; ]]]
spinner:
- pointer-events: none # unlocks the interaction with the card
- --button-card-spinner-background-color: none # removes the partially opaque overlay
- --button-card-spinner-color: >
[[[ return variables.kleur; ]]]
and template:
button_picture:
template:
- action_default
- styles_tooltip
size: 90%
show_name: false
show_entity_picture: true
color_type: card. # <----- beware for spinner
aspect_ratio: 1
state:
- value: 'on'
color: var(--background-color-on)
styles:
icon:
- color: var(--icon-color-on)
id: 'on'
- value: 'off'
color: var(--background-color-off)
styles:
icon:
- color: var(--icon-color-off)
id: 'off'
Screenshots
If applicable, add screenshots to help explain your problem.
with color_type: card
without
Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working