Hello
Désolé, changement de plan pour le WE donc je ne réponds que ce soir …
Donc dans la version finale de la carte, c’est une custom:stack-in-card horizontal avec des custom:mushroom-entity-card donc à mettre dans l’ordre qu’on souhaite
Version decluttering
mushroom_cover_group:
element:
type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:mushroom-template-card
primary: ''
icon_color: none
multiline_secondary: true
secondary: >-
{% set all = expand('cover.volets_[[groupe]]'|lower) -%} {% set
positions = all |
map(attribute='attributes.current_position')|list-%} {% set moving =
all | selectattr('state', 'in', ['opening','closing'])|list|count
-%} {% set open = positions | reject("!=",100) |list |count -%} {%
set closed = positions | reject("!=",0) |list |count -%} {% set
other = positions|list|count - open - closed - moving -%}Fermés={{
closed }} Partiels={{ other }} Ouverts={{ open }} {% if moving >0
-%}Actifs={{ moving }}{% endif %}
icon: '[[icon]]'
- type: horizontal-stack
cards:
- type: custom:mushroom-entity-card
entity: cover.volets_[[groupe]]
icon: mdi:arrow-up
primary_info: none
vertical: true
secondary_info: none
icon_color: disabled
card_mod:
style: |
ha-card {
--chip-background: rgba(var(--rgb-grey), 0.05);
}
tap_action:
action: call-service
haptic: success
service: cover.set_cover_position
service_data:
entity_id: cover.volets_[[groupe]]
position: 100
- type: custom:mushroom-entity-card
entity: cover.volets_[[groupe]]
icon: mdi:pause
primary_info: none
vertical: true
secondary_info: none
icon_color: disabled
card_mod:
style: |
.shape {
background-color: rgba(var(--rgb-grey), 0.01);
}
tap_action:
action: call-service
haptic: success
service: cover.stop_cover
service_data:
entity_id: cover.volets_[[groupe]]
- type: custom:mushroom-entity-card
entity: cover.volets_[[groupe]]
icon: mdi:arrow-down
primary_info: none
vertical: true
secondary_info: none
icon_color: disabled
card_mod:
style: |
ha-card {
--chip-background: rgba(var(--rgb-grey), 0.025);
}
tap_action:
action: call-service
haptic: success
service: cover.set_cover_position
service_data:
entity_id: cover.volets_[[groupe]]
position: 0```