Moin zusammen,
mit hilfe von Card Mod kann man ja schöne dinge anstellen. Wie z.b. eine Card blinken lassen. Das klappt auch bei mir wunderbar. Nun habe ich aber eine mushroom-template-card in einen grid-layout. Hier passiert leider nichts. Geht das nicht, oder mache ich was falsch?
type: custom:layout-card
layout_type: custom:grid-layout
cards:
- type: custom:mushroom-template-card
primary: >-
{% if is_state('binary_sensor.gaste_wc_bewegungsmelder_bewegung', 'on') %}
Bewegung
{% elif is_state('binary_sensor.gaste_wc_bewegungsmelder_bewegung', 'off') %}
Inaktiv
{% else %}
Offline...
{% endif %}
secondary: >-
{{ as_timestamp(states("input_datetime.kontrollraum_gaste_wc_bewegung_letzte_status_anderung")) | timestamp_custom('%d.%m. - %H:%M') }} Uhr
icon: >-
{% if is_state('binary_sensor.gaste_wc_bewegungsmelder_bewegung', 'on') %}
mdi:motion-sensor
{% else %}
mdi:motion-sensor-off
{% endif %}
icon_color: >-
{% if is_state('binary_sensor.gaste_wc_bewegungsmelder_bewegung', 'on') %}
orange
{% elif is_state('binary_sensor.gaste_wc_bewegungsmelder_bewegung', 'off') %}
grey
{% else %}
red
{% endif %}
card_mod:
style: |
ha-card {
{% if is_state('binary_sensor.gaste_wc_bewegungsmelder_bewegung', 'unavailable') %}
animation: ping 2s infinite;
{% else %}
animation:
{% endif %}
}
@keyframes ping {
0% {box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);}
70% {box-shadow: 0 0 0 5px transparent;}
100% {box-shadow: 0 0 0 0 transparent;}
}
- type: custom:mushroom-light-card
entity: light.gaste_wc_licht_alle_lampen
use_light_color: true
show_brightness_control: false
secondary_info: none
primary_info: none
show_color_control: false
hold_action:
action: none
double_tap_action:
action: none
name: Lichter
tap_action:
action: more-info
icon: mdi:palette
fill_container: false
show_color_temp_control: false
- type: custom:mushroom-template-card
primary_info: none
secondary_info: none
icon: |-
{% if is_state('light.gaste_wc_licht_alle_lampen', 'on') %}
mdi:lightbulb-group
{% else %}
mdi:lightbulb-group-off
{% endif %}
icon_color: |-
{% if is_state('light.gaste_wc_licht_alle_lampen', 'on') %}
orange
{% else %}
grey
{% endif %}
tap_action:
action: perform-action
perform_action: automation.trigger
target:
entity_id: automation.gaste_wc_licht_manuell_ein_ausschalten
data:
skip_condition: true
hold_action:
action: none
double_tap_action:
action: none
primary: ""
secondary: ""
layout:
grid-template-columns: 56% 22% 22%
margin: "-4px"