not working
type: custom:button-card
show_state: true
name: Woonkamer
icon: mdi:sofa
style: |
ha-card {
background-color: rgba(0,0,0,0);
box-shadow: none;
border: 60px;
}
custom_fields:
btn:
card:
type: custom:mushroom-chips-card
chips:
- type: template
tap_action:
action: toggle
icon: mdi:lamp
entity: switch.kitchen_lights
content: Kast
secondary: '{{ states ("switch.sonoff_10005fcd55")}}'
color: black
card_mod:
style: |
ha-card {
--chip-background: {{'rgba(0, 255, 0, 1)'if
is_state('switch.sonoff_10006f5960', 'on') else 'rgba(230, 0, 0, 0.5)' }};
padding: 5px!important;
border-radius: 100px!important;
}
- type: template
tap_action:
action: toggle
icon: mdi:radiator-disabled
entity: switch.sonoff_10005fcd55
content: Schouw
card_mod:
style: |
ha-card {
--chip-background: {{ 'rgba(0, 255, 0, 1)' if
is_state('switch.sonoff_10005fcd55', 'on') else 'rgba(230, 100, 0, 0.5)' }};
padding: 5px!important;
border-radius: 100px!important;
}
- type: template
tap_action:
action: toggle
icon: mdi:led-strip-variant
entity: light.ledstrip
content: Ledstrip
card_mod:
style: |
ha-card {
--chip-background: {{ 'rgba(0, 255, 0, 1)' if is_state('light.ledstrip', 'on')
else 'rgba(100, 0, 200, 0.5)' }};
padding: 5px!important;
border-radius: 100px!important;
}
- type: template
entity: switch.sonoff_10005fcd55
content: Kast is {{ states ('switch.kitchen_lights')}}
icon_color: |-
{% if is_state('switch.sonoff_10005fcd55', 'on')
%}
amber
{% else %}
grey
{% endif %}
icon: |-
{% if is_state('switch.kitchen_lights', 'on')
%}
mdi:lightbulb-on
{% else %}
mdi:lightbulb-off
{% endif %}
tap_action:
action: toggle
card_mod:
style: |
ha-card {
--chip-background: {{ 'rgba(0, 255, 0, 1)' if is_state('light.ledstrip', 'on')
else 'rgba(20, 140, 100, 0.5)' }};
padding: 5px!important;
border-radius: 100px!important;
}
card_mod:
style:
mushroom-template-chip:nth-child(1)$: |
ha-state-icon {
{{ 'animation: bounce 1.5s ease-in-out infinite; ' if is_state('switch.kitchen_lights', 'on') }}
transform-origin: 50% 75%;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0); }
40% { transform: translateY(-1.2px) rotate(5deg); }
60% { transform: translateY(-1.1px) rotate(-4deg); }
}
@keyframes wash {
50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); }
}
mushroom-template-chip:nth-child(2)$: |
ha-state-icon {
{{ 'animation: bounce 1.5s ease-in-out infinite; ' if is_state('switch.kitchen_lights', 'on') }}
transform-origin: 50% 75%;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0); }
40% { transform: translateY(-1.2px) rotate(5deg); }
60% { transform: translateY(-1.1px) rotate(-4deg); }
}
@keyframes wash {
50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); }
}
mushroom-template-chip:nth-child(3)$: |
ha-state-icon {
{{ 'animation: bounce 1.5s ease-in-out infinite; ' if is_state('switch.kitchen_lights', 'on') }}
transform-origin: 50% 75%;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0); }
40% { transform: translateY(-1.2px) rotate(5deg); }
60% { transform: translateY(-1.1px) rotate(-4deg); }
}
@keyframes wash {
50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); }
}
mushroom-template-chip:nth-child(4)$: >
ha-state-icon {
{{ 'animation: illumination 2s infinite;' if
is_state('switch.kitchen_lights',
'on') }}
}
@keyframes illumination {
80% { clip-path: polygon(0% 99%, 20% 55%, 22% 37%, 39% 20%, 61%
21%, 77% 35%, 79% 57%, 99% 100%); }
}
styles:
grid:
- grid-template-areas: '"n btn " "s btn" "i btn"'
- grid-template-columns: 1fr 1fr min-content
- grid-template-rows: min-content min-content 1fr
card:
- padding: 22px 8px 22px
- height: 280px
custom_fields:
btn:
- justify-content: end
- align-self: start
- padding-top: 20px
name:
- justify-self: start
- align-self: start
- font-size: 12px
- font-weight: 1000
- color: pink
state:
- justify-self: start
- align-self: start
- font-size: 14px
- opacity: 0.7
img_cell:
- justify-content: start
- position: absolute
- width: 100px
- height: 100px
- left: 0
- bottom: 0
- margin: 0 0 -30px -30px
- background: '#FFC47E'
- border-radius: 500px
icon:
- position: relative
- width: 100px
- color: black
- opacity: 0.6
[/quote]
type: custom:button-card
show_state: true
name: Woonkamer
icon: mdi:sofa
custom_fields:
btn:
card:
type: custom:mushroom-chips-card
chips:
- type: template
tap_action:
action: toggle
icon: mdi:lamp
entity: switch.sonoff_10006f5960
content: Kast
color: black
card_mod:
style: |
ha-card {
--chip-background: {{'rgba(0, 255, 0, 1)' if is_state('switch.sonoff_10006f5960', 'on') else 'rgba(230, 0, 0, 0.5)' }};
padding: 5px!important;
border-radius: 100px!important;
}
- type: template
tap_action:
action: toggle
icon: mdi:radiator-disabled
entity: switch.sonoff_10005fcd55
content: Schouw
card_mod:
style: |
ha-card {
--chip-background: {{ 'rgba(0, 255, 0, 1)' if is_state('switch.sonoff_10005fcd55', 'on') else 'rgba(230, 100, 0, 0.5)' }};
padding: 5px!important;
border-radius: 100px!important;
}
- type: template
tap_action:
action: toggle
icon: mdi:led-strip-variant
entity: light.ledstrip
content: Ledstrip
card_mod:
style: |
ha-card {
--chip-background: {{ 'rgba(0, 255, 0, 1)' if is_state('light.ledstrip', 'on') else 'rgba(100, 0, 200, 0.5)' }};
padding: 5px!important;
border-radius: 100px!important;
}
- type: template
entity: switch.sonoff_10005fcd55
content: Kast is {{ states ('switch.sonoff_10005fcd55')}}
icon_color: >-
{% if is_state('switch.sonoff_10005fcd55',
'on')%}
amber
{% else %}
grey
{% endif %}
icon: >-
{% if is_state('switch.sonoff_10005fcd55',
'on')%}
mdi:lightbulb-on
{% else %}
mdi:lightbulb-off
{% endif %}
tap_action:
action: toggle
card_mod:
style: |
ha-card {
--chip-background: {{ 'rgba(0, 255, 0, 1)' if is_state('light.ledstrip', 'on')
else 'rgba(20, 140, 100, 0.5)' }};
padding: 5px!important;
border-radius: 100px!important;
card_mod:
style:
mushroom-template-chip:nth-child(1)$: |
ha-state-icon {
{{ 'animation: bounce 1.5s ease-in-out infinite; ' if is_state('switch.sonoff_10006f5960', 'on') }}
transform-origin: 50% 75%;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0); }
40% { transform: translateY(-1.2px) rotate(5deg); }
60% { transform: translateY(-1.1px) rotate(-4deg); }
}
@keyframes wash {
50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); }
}
mushroom-template-chip:nth-child(2)$: |
ha-state-icon {
{{ 'animation: bounce 1.5s ease-in-out infinite; ' if is_state('switch.kitchen_lights', 'on') }}
transform-origin: 50% 75%;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0); }
40% { transform: translateY(-1.2px) rotate(5deg); }
60% { transform: translateY(-1.1px) rotate(-4deg); }
}
@keyframes wash {
50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); }
}
mushroom-template-chip:nth-child(3)$: |
ha-state-icon {
{{ 'animation: bounce 1.5s ease-in-out infinite; ' if is_state('switch.sonoff_10005fcd55', 'on') }}
transform-origin: 50% 75%;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0); }
40% { transform: translateY(-1.2px) rotate(5deg); }
60% { transform: translateY(-1.1px) rotate(-4deg); }
}
@keyframes wash {
50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); }
}
mushroom-template-chip:nth-child(4)$: |
ha-state-icon {
{{ 'animation: illumination 2s infinite;' if is_state('switch.sonoff_10005fcd55', 'on') }}
}
@keyframes illumination {
80% { clip-path: polygon(0% 99%, 20% 55%, 22% 37%, 39% 20%, 61%
21%, 77% 35%, 79% 57%, 99% 100%); }
}
styles:
grid:
- grid-template-areas: '"n btn " "s btn" "i btn"'
- grid-template-columns: 1fr 1fr min-content
- grid-template-rows: min-content min-content 1fr
card:
- font-size: 18px
- background: radial-gradient(rgb(18, 81, 219, 50%), rgb(0,0,0, 50&))
- border: 10px solid rgb(18, 81, 219, 50%)
- padding: 22px 8px 22px
- height: 330px
custom_fields:
btn:
- justify-content: end
- align-self: start
- padding-top: 50px
name:
- justify-self: start
- position: absolute
- align-self: start
- font-size: 16px
- top: 12px
- font-weight: 1000
- color: pink
state:
- justify-self: start
- align-self: start
- font-size: 14px
- opacity: 0.7
img_cell:
- justify-content: start
- position: absolute
- width: 100px
- height: 100px
- left: 0
- bottom: 0
- margin: 0 0 -30px -30px
- background: '#FFC47E'
- border-radius: 500px
icon:
- position: relative
- width: 120px
- color: black
- opacity: 0.6