Hello I canāt make the motion sensor chip card animate, managed to do it for a AC chip card but this one no:
Like in this example
I think I am close but Iām missing somethingā¦
type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-template-card
icon: mdi:knife
icon_color: |-
{% if is_state('light.kitchen_main_light', 'on') %}
orange
{% endif %}
primary: Kitchen
secondary: >-
{{ states('sensor.kitchen_multi_sensor_temperature') | round(1) }}Ā°C - {{
states('sensor.kitchen_multi_sensor_humidity')| round}}%
tap_action:
action: navigate
navigation_path: kitchen
hold_action:
action: toggle
entity: light.kitchen_lights
multiline_secondary: false
fill_container: false
card_mod:
style: |
ha-card {
background :rgba(var(--rgb-primary-text-color), 0.025);
}
- type: custom:mushroom-chips-card
chips:
- type: template
entity: binary_sensor.kitchen_motion_sensor_occupancy
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:motion-sensor
{% else %}
mdi:motion-sensor-off
{% endif %}
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
tap_action:
action: more-info
- type: template
entity: sensor.kitchen_cooktop_current_comsumption
icon: mdi:stove
icon_color: |-
{% set consumptiontion_level = states(entity) | float(0) %}
{% if consumptiontion_level > 0 %}
primary
{% else %}
grey
{% endif %}
- type: template
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:window-open-variant
{% else %}
mdi:window-closed-variant
{% endif %}
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
entity: binary_sensor.window_sensor_kitchen_contact
alignment: end
card_mod:
style: |
ha-card {
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: -0.5em;
--chip-icon-size: 0.5em
}
mushroom-template-chip:nth-child(1)$: |
ha-state-icon {
animation: clip 2s linear infinite;
}
@keyframes clip {
50% { clip-path: polygon(0 0, 55% 0, 100% 100%, 0 100%); }
}
card_mod:
style: |
ha-card {
height: 102px;
}
Hereās my full room cards for now for anyone interested :
type: horizontal-stack
cards:
- type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-template-card
icon: mdi:knife
icon_color: |-
{% if is_state('light.kitchen_main_light', 'on') %}
orange
{% endif %}
primary: Kitchen
secondary: >-
{{ states('sensor.kitchen_multi_sensor_temperature') | round(1) }}Ā°C
- {{ states('sensor.kitchen_multi_sensor_humidity')| round}}%
tap_action:
action: navigate
navigation_path: kitchen
hold_action:
action: toggle
entity: light.kitchen_lights
multiline_secondary: false
fill_container: false
card_mod:
style: |
ha-card {
background :rgba(var(--rgb-primary-text-color), 0.025);
}
- type: custom:mushroom-chips-card
chips:
- type: template
entity: binary_sensor.kitchen_motion_sensor_occupancy
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:motion-sensor
{% else %}
mdi:motion-sensor-off
{% endif %}
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
tap_action:
action: more-info
- type: template
entity: sensor.kitchen_cooktop_current_comsumption
icon: mdi:stove
icon_color: |-
{% set consumptiontion_level = states(entity) | float(0) %}
{% if consumptiontion_level > 0 %}
primary
{% else %}
grey
{% endif %}
- type: template
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:window-open-variant
{% else %}
mdi:window-closed-variant
{% endif %}
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
entity: binary_sensor.window_sensor_kitchen_contact
alignment: end
card_mod:
style: |
ha-card {
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: -0.5em;
--chip-icon-size: 0.5em}
}
card_mod:
style: |
ha-card {
height: 102px;
}
- type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-template-card
secondary: >-
{{ states('sensor.aqara_multi_sensor_2_living_room_temperature') |
round(1) }} Ā°C - {{
states('sensor.aqara_multi_sensor_2_living_room_humidity') |
round(0)}}%
icon: mdi:sofa
entity: light.living_room_lights
icon_color: |-
{% if is_state('light.living_room_lights', 'on') %}
orange
{% endif %}
primary: Living Room
hold_action:
action: call-service
service: light.toggle
service_data:
transition: 1
brightness_pct: 75
target:
area_id: living_room
tap_action:
action: navigate
navigation_path: livingroom
multiline_secondary: false
fill_container: true
card_mod:
style: |
ha-card {
background :rgba(var(--rgb-primary-text-color), 0.025);
}
- type: custom:mushroom-chips-card
chips:
- type: template
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:radiator
{% else %}
mdi:radiator-off
{% endif %}
entity: switch.living_room_heater_garden_left_switch_0
- type: template
entity: input_boolean.ryzen_5700x_pc
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:desktop-tower-monitor
{% else %}
mdi:desktop-tower-monitor
{% endif %}
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
tap_action:
action: more-info
- type: conditional
conditions: []
chip:
type: template
icon_color: |-
{% if is_state(config.entity, 'off') %}
grey
{% else %}
primary
{% endif %}
entity: climate.daikin_living_room
icon: |-
{% if is_state(entity, 'heat_cool') %}
mdi:sync
{% elif is_state(entity, 'heat') %}
mdi:fire
{% elif is_state(entity, 'cool') %}
mdi:snowflake
{% elif is_state(entity, 'dry') %}
mdi:water-percent
{% elif is_state(entity, 'fan_only') %}
mdi:fan
{% else %}
mdi:air-conditioner
{% endif %}
card_mod:
style: |
ha-card {
animation: spin linear infinite;
{% if is_state(config.entity, 'heat_cool') %}
animation: spin 3s ease-in-out infinite alternate;
{% elif is_state(config.entity, 'cool') %}
animation: cool 6s ease-in-out infinite;
{% elif is_state(config.entity, 'heat') %}
animation: heat 2s infinite;
{% elif is_state(config.entity, 'dry') %}
animation: dry 1.5s linear infinite;
{% elif is_state(config.entity, 'fan_only') %}
animation: spin 1s linear infinite;
{% endif %}
}
@keyframes cool {
0%, 100% { transform: rotate(25deg); }
25% { transform: rotate(-25deg); }
50% { transform: rotate(50deg); }
75% { transform: rotate(-50deg); }
}
@keyframes heat {
0%, 100% { --icon-color: rgba(var(--rgb-red), 1); }
10%, 90% { --icon-color: rgba(var(--rgb-red), 0.8); }
20%, 80% { --icon-color: rgba(var(--rgb-red), 0.6); }
30%, 70% { --icon-color: rgba(var(--rgb-red), 0.4); }
40%, 60% { --icon-color: rgba(var(--rgb-red), 0.2); }
50% { --icon-color: rgba(var(--rgb-red), 0); }
}
@keyframes dry {
0%, 100% { --icon-symbol-size: 21px; }
10%, 90% { --icon-symbol-size: 22px; }
20%, 80% { --icon-symbol-size: 23px; }
30%, 70% { --icon-symbol-size: 24px; }
40%, 60% { --icon-symbol-size: 25px; }
50% { --icon-symbol-size: 26px; }
}
- type: template
entity: binary_sensor.livingroom_window_contact_contact
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:window-open-variant
{% else %}
mdi:window-closed-variant
{% endif %}
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
tap_action:
action: more-info
- type: template
entity: binary_sensor.livingroom_door_contact_contact
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:door-open
{% else %}
mdi:door-closed
{% endif %}
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
tap_action:
action: more-info
- type: template
entity: media_player.living_room_speaker
icon: |-
{% if is_state(config.entity, 'playing') %}
mdi:speaker-play
{% else %}
mdi:speaker-off
{% endif %}
icon_color: |-
{% if is_state(config.entity, 'playing') %}
primary
{% else %}
grey
{% endif %}
tap_action:
action: more-info
- type: template
entity: vacuum.vaccubot
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:robot-vacuum
{% else %}
mdi:robot-vacuum-off
{% endif %}
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
- type: template
icon_color: |-
{% if is_state(config.entity, 'on') %}
primary
{% else %}
grey
{% endif %}
icon: |-
{% if is_state(config.entity, 'on') %}
mdi:air-humidifier
{% else %}
mdi:air-humidifier-off
{% endif %}
entity: humidifier.humidifier
alignment: end
card_mod:
style: |
ha-card {
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: -0.5em;
--chip-icon-size: 0.5em}
}
card_mod:
style: |
ha-card {
height: 102px;
}
And some WIP work on graph with dynamic color, directly integrated in the room cards thanks
PskNorzNoRz for the ideas !