Merci
Je ferai ça depuis un pc ! Directement sur Home assistant sur iPad c’est quasi impossible de gérer les erreurs d’Indentations
Merci en tous cas pour ton boulot
Phil
Je suis déjà aller voir la doc, mais je ne saisi pas vraiment ce qui doit s’afficher en popup avec tes cartes…
Je ne vois pas où cliquer pour avoir une popup…
Ou sinon, j’ai raté quelque chose…
Ah ok, j’avais pas compris.
En fait c’est un Pop-up en soit. Le screenshot que tu as vu c’est mon Pop-up bubble-card, qui comporte deux conditional-Card qui elles même comportent un separator Bubble et un tableau avec les MAJ.
Tu veux dire que quand ton dashboard se charge, ça va afficher ou non les deux cartes des mises à jour ?
Et qu’il n’y a pas de clic à faire pour faire afficher une popup ?
Haaa !!!
Mais voilà ce dont j’ai besoin ^^
Une icone sur mon dashboard qui me dise qu’il y a une ou plusieurs mises-à-jours à faire, et quand je clique dessus, ça ouvre les cartes dont tu as mis le code précédemment ![]()
Pourrais-tu partager le code permettant de faire celà s’il te plait ?
https://github.com/Clooos/Bubble-Card
![]()
Na j’deconne:
tap_action:
action: navigate
navigation_path: "#update"
A mettre dans ta carte qui appelle le popup.
Le hash (#update) doit correspondre avec la carte du Pop-up.
Merci, je teste ça dès que je peux ![]()
une icône, n’est pas un entity_picture ![]()
C’est à mettre dans ton configuration.yaml, sous homeassistant:
exemple :
homeassistant:
customize:
# Add an entry for each entity that you want to overwrite.
thermostat.family_room:
entity_picture: /local/images/nest.jpg
switch.wemo_switch_2:
icon: mdi:kettle
/local/images/ = /config/www/images/
Bonjour,
à lire tout ça je vais rester en version 1.34 de HACS
, pourtant j’ai cru lire que les mises à jour apparaissaient maintenant avec les mises à jour HA « de base » !
Bob
Et bien ça me convient très bien comme ça, je ferai la mise à jour prochainement ![]()
Bob
D’accord avec toi @Bob , pourquoi se compliquer la vie ![]()
Vraiment sympa ton intégration.
Je vais m’en inspirer, surtout que je suis en train de faire mon interface via bubble-card.
Par contre, pour tes sensor et binary_sensor, tu n’as pas beosin de mettre d’argument platform dans ta config ?
Hello,
En mode package :
template:
- sensor:
- name: "Nombre de mises à jour HACS"
unique_id: "nombre_de_mises_a_jour_hacs"
state: >
{{
integration_entities('hacs')
| select('search', '^update.')
| select('is_state', 'on')
| list
| count
}}
###############################################################################
# Updates availables / disponibles
# #############################################################################
- name: available_updates_system
state: |
{% set var = states.update
|selectattr('state', 'equalto', 'on')
|select('search', 'home_assistant')
...............................................
...............................................
- binary_sensor:
- name: "...............................
..........................................
Bon ben ça y est…
Le passage HACS v2.0, c’est fait…
J’ai bien joué avec toutes vos propositions, j’ai découvert de nouvelles cartes et de nouvelles façon de faire… Vous êtes tous de grand malades, bravo !
Mais après quelques tests, je suis revenu à encore plus simple qu’avant… Vu que toutes les updates sont désormais traitées de la même façon, j’ai cherché à respecter cette nouvelle philosophie et j’ai donc évité de faire plusieurs cartes différentes…
Donc j’ai laissé tous les updates ensemble et j’ai revu cette partie du dashboard comme ça:
-
Toujours ma carte de synthèse sur le dashboard principal qui affiche les maj si il y en a avec l’icone et le badge:
tout est à jour :
des updates sont dispo:

Sauf que c’est désormais animé par un petit template sensor qui compte les updates à ‹ on ›.
-
Puis si on clique pour ouvrir la sous vue système, il y a désormais dedans une carte avec une vue de synthèse qui affiche le nb de mises à jour et, avec auto entities, l’ensemble des mises à jour à faire (tout en vrac du coup, je n’ai fait aucun tri entre HA, HACS, modules complémentaires etc…):
ici sans MaJ:

avec 1 MaJ:

Ici avec 2 MaJ:

le code de la carte:
Bien sur il faut avoir vertical-stack-in-card, mushroom et auto-entities
type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Software et modules
secondary: |2-
{% if is_state(entity, '0') %}
Tout est à jour
{% elif is_state(entity, '1') %}
1 mise à jour
{% else %}
{{ states(entity)}} mises à jour
{% endif %}
icon: mdi:home-assistant
entity: sensor.available_updates
icon_color: |2-
{% if is_state(entity, '0') %}
light-blue
{% else %}
orange
{% endif %}
- type: custom:auto-entities
card:
type: custom:vertical-stack-in-card
card_param: cards
filter:
include:
- entity_id: update.*
state: 'on'
options:
type: custom:mushroom-template-card
primary: '{{ state_attr(entity,''friendly_name'')}}'
secondary: >-
instalé: {{ state_attr(entity,'installed_version')}} | dernier: {{
state_attr(entity,'latest_version')}}
icon: |-
{% if is_state(entity, 'on') %}
mdi:upload-box
{% else %}
mdi:thumb-up
{% endif %}
icon_color: |-
{% if is_state(entity, 'on') %}
orange
{% else %}
green
{% endif %}
layout: horizontal
tap_action:
action: more-info
hold_action:
action: more-info
double_tap_action:
action: more-info
exclude: null
sort:
method: state
reverse: true
- Et lorsqu’on clique sur une des cartes des soft à mettre à jour, ça ouvre le « more info » de l’entité update:
Celui ci contient les details, le lien vers le changelog et les boutons ignorer / installer…

Et lorsqu’on clique sur le contenu des versions, on ouvre une nouvelle page de navigateur.
Au final c’est simple, c’est complet… Ca me semble pragmatique… On verra à l’usage si c’est problématique de traiter de la même façon tous les updates…
Quand t’en as moins de 5 ça va ![]()
Très limpide ce que tu as fait. En réalité on n’a pas vraiment besoin de plus !
Merci à tous ici d’avoir poster vos idées et vos card!
Grace à vous j’ai fais un mélange d’un peut tout et je suis arrivé à une version de dashboard qui me satisfait pour mon usage.
On va pas dire que je me suis « amusé », le CSS et card_mod quel tannée !!
![]()
Mais voila mon resultat ![]()
Pendant une MAJ
et apres la MAJ
Et voici le code
Panneau de gauche
type: vertical-stack
cards:
- type: custom:button-card
show_name: false
show_icon: false
show_state: false
card_mod:
style: |
ha-card {
pointer-events: none;
}
styles:
grid:
- grid-template-areas: '"card1 card2 card3" '
- grid-template-columns: 1fr 0.69fr 0.05fr
- grid-template-rows: 0fr 0fr
card:
- margin-top: 1.5rem
- padding: 5px 0px 5px 10px
- background: rgba(0,0,0,0)
custom_fields:
card1: null
card2:
- align-self: top
- height: 100%
custom_fields:
card1:
card:
type: custom:mushroom-title-card
title: Home Assistant Server
subtitle: >
Core v{{ state_attr('update.home_assistant_core_update',
'installed_version') }} - OS v{{
state_attr('update.home_assistant_operating_system_update',
'installed_version') }} - Supervisor v{{
state_attr('update.home_assistant_supervisor_update',
'installed_version') }}
alignment: start
card_mod:
style: |
.header {
padding: 0px !important;
}
ha-card {
margin-right: -15rem;
}
card2:
card:
type: markdown
content: >-
{% set
maj=integration_entities('hassio')|select('search','update.home')|select('is_state','on')|list|count|int(2)
%} {% set
total=integration_entities('hassio')|select('search','update.home')|list|count|int(2)
%} {% if maj == 0 %} <ha-alert alert-type="success" title="{{maj}}
mise a jour sur {{total}}" > {% elif maj == 1 %} <ha-alert
alert-type="warning" title="{{maj}} mise a jour sur {{total}}" > {%
elif maj > 1 %} <ha-alert alert-type="warning" title="{{maj}} mises
a jour sur {{total}}" ></ha-alert> {% else %} {% endif %}
card_mod:
style: |
:host {
--ha-card-margin: 0px;
--ha-card-background: #00000000 !important;
--ha-card-border-color: #00000000 !important;
}
ha-markdown.no-header {
margin: 0px !important;
}
ha-card {
margin-top: -1rem;
font-size: 1rem;
--mdc-icon-size: 1.3rem;
}
- type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:mushroom-update-card
entity: update.home_assistant_core_update
name: HA Core
show_buttons_control: true
icon_type: entity-picture
fill_container: false
- type: custom:mushroom-template-card
primary: Version Information
secondary: >-
Installed v{{ state_attr('update.home_assistant_core_update',
'installed_version')}}
Latest v{{ state_attr('update.home_assistant_core_update',
'latest_version')}}
icon: mdi:package-variant-closed
multiline_secondary: true
fill_container: true
entity: update.home_assistant_core_update
tap_action:
action: more-info
icon_color: |-
{% if is_state('update.home_assistant_core_update', 'on') %}
orange
{% else %}
green
{% endif %}
badge_color: |-
{% if is_state('update.home_assistant_core_update', 'on') %}
red
{% else %}
blue
{% endif %}
badge_icon: |-
{% if is_state('update.home_assistant_core_update', 'on') %}
mdi:help
{% else %}
mdi:check-bold
{% endif %}
card_mod:
style: |
ha-card {
pointer-events: none;
}
- type: horizontal-stack
cards:
- type: custom:mushroom-update-card
entity: update.home_assistant_operating_system_update
name: HA OS
show_buttons_control: true
icon_type: entity-picture
- type: custom:mushroom-template-card
primary: Version Information
secondary: >-
Installed v{{
state_attr('update.home_assistant_operating_system_update',
'installed_version')}}
Latest v{{
state_attr('update.home_assistant_operating_system_update',
'latest_version')}}
icon: mdi:package-variant-closed
multiline_secondary: true
fill_container: true
entity: update.home_assistant_operating_system_update
tap_action:
action: more-info
icon_color: >-
{% if is_state('update.home_assistant_operating_system_update',
'on') %}
orange
{% else %}
green
{% endif %}
badge_color: >-
{% if is_state('update.home_assistant_operating_system_update',
'on') %}
red
{% else %}
blue
{% endif %}
badge_icon: >-
{% if is_state('update.home_assistant_operating_system_update',
'on') %}
mdi:help
{% else %}
mdi:check-bold
{% endif %}
card_mod:
style: |
ha-card {
pointer-events: none;
}
- type: horizontal-stack
cards:
- type: custom:mushroom-update-card
entity: update.home_assistant_supervisor_update
name: HA Supervisor
show_buttons_control: true
icon_type: entity-picture
- type: custom:mushroom-template-card
primary: Version Information
secondary: >-
Installed v{{
state_attr('update.home_assistant_supervisor_update',
'installed_version')}}
Latest v{{ state_attr('update.home_assistant_supervisor_update',
'latest_version')}}
icon: mdi:package-variant-closed
multiline_secondary: true
fill_container: true
entity: update.home_assistant_core_update
tap_action:
action: more-info
icon_color: |-
{% if is_state('update.home_assistant_supervisor_update', 'on') %}
orange
{% else %}
green
{% endif %}
badge_color: |-
{% if is_state('update.home_assistant_supervisor_update', 'on') %}
red
{% else %}
blue
{% endif %}
badge_icon: |-
{% if is_state('update.home_assistant_supervisor_update', 'on') %}
mdi:help
{% else %}
mdi:check-bold
{% endif %}
card_mod:
style: |
ha-card {
pointer-events: none;
}
- type: vertical-stack
cards:
- type: custom:button-card
show_name: false
show_icon: false
show_state: false
card_mod:
style: |
ha-card {
pointer-events: none;
}
styles:
grid:
- grid-template-areas: '"card1 card2 card3" '
- grid-template-columns: 1fr 0.69fr 0.05fr
- grid-template-rows: 0fr 0fr
card:
- padding: 5px 0px 5px 10px
- background: rgba(0,0,0,0)
custom_fields:
card1: null
card2:
- align-self: top
- height: 100%
custom_fields:
card1:
card:
type: custom:mushroom-title-card
title: HACS
subtitle: >-
Installed v{{ state_attr('update.hacs_update',
'installed_version') }} - Latest v{{
state_attr('update.hacs_update', 'latest_version') }}
alignment: start
card_mod:
style: |
.header {
padding: 0px !important;
}
ha-card {
margin-right: -15rem;
}
card2:
card:
type: markdown
content: >-
{% set
need_update=integration_entities('hacs')|select('search','update.hacs_update')|select('is_state','on')|list|count|int(2)
%} {% if need_update == 0 %} <ha-alert alert-type="success"
title="HACS est à jour" > {% else %} <ha-alert
alert-type="error" title="1 mise a jour de HASC est disponible"
></ha-alert> {% endif %}
card_mod:
style: |
:host {
--ha-card-margin: 0px;
--ha-card-background: #00000000 !important;
--ha-card-border-color: #00000000 !important;
}
ha-markdown.no-header {
margin: 0px !important;
}
ha-card {
margin-top: -1.3rem;
margin-bottom: -1.3rem;
margin-left: -1rem;
font-size: 1rem;
--mdc-icon-size: 1.3rem;
}
- type: custom:mushroom-chips-card
chips:
- type: template
icon: mdi:web
icon_color: blue
content: Release Changelog
tap_action:
action: url
url_path: https://github.com/hacs/integration/releases
- type: template
entity: update.hacs_update
content: >-
Installed v{{ state_attr('update.hacs_update',
'installed_version') }}
icon_color: green
icon: mdi:package-variant-closed
tap_action:
action: none
- type: template
entity: update.hacs_update
content: Latest v{{ state_attr('update.hacs_update', 'latest_version') }}
icon_color: orange
icon: mdi:package-variant-closed
tap_action:
action: none
card_mod:
style:
mushroom-template-chip:nth-child(2):
$: |
mushroom-chip{
pointer-events: none;
}
mushroom-template-chip:nth-child(3):
$: |
mushroom-chip{
pointer-events: none;
}
- type: custom:auto-entities
card:
type: vertical-stack
card_param: cards
filter:
include:
- entity_id: update.hacs_update
state: 'on'
options:
type: custom:button-card
show_name: true
show_icon: true
show_state: true
show_entity_picture: true
variables:
url: |
[[[
return entity.attributes.release_url
]]]
sensor: |
[[[
let name = Object.values(entity)
return name[0]
]]]
name: |
[[[
return entity.attributes.friendly_name.replace('update','')
]]]
state_display: >
[[[
if(entity.state== "on" & entity.attributes.in_progress ==
false)
return entity.attributes.installed_version +' - ' + entity.attributes.latest_version
else if(entity.state== "off")
return helpers.localize(entity) +' - '+ entity.attributes.installed_version
else
return "instal - "+entity.attributes.update_percentage+"%"
]]]
styles:
grid:
- grid-template-areas: '"i n n cardupload" "i s cardurl cardupload"'
- grid-template-columns: 1fr 1fr 1fr 1.5fr;
- grid-template-rows: repeat(2, 50%);
- gap: 0px 0px;
card:
- padding: 0px
- height: 100%
- width: 100%
icon:
- align-self: center
- left: 25%
- width: 55%
name:
- justify-self: start
- font-size: 0.9em
- font-weight: 450
- padding-top: 8px
state:
- justify-self: start
- font-size: 0.75em
- padding-bottom: 0.7em
- padding-right: 8rem
custom_fields:
cardurl:
- justify-self: center
- margin-bottom: 0.7em
- margin-left: 2rem
- margin-right: '-2rem'
custom_fields:
cardurl:
card:
type: custom:button-card
show_icon: false
name: |
[[[
if (variables.url == null)return ""
else
{return '<a style="color:white" href="'+[variables.url]+'">'+[variables.url.substr(8,18).toLowerCase()]+'</a>'}
endif
]]]
tap_action:
action: url
url_path: |
[[[
return variables.url
]]]
styles:
card:
- background: rgba(100,150,255,0.5)
- width: 13rem
- box-sizing: border-box
- padding: 0px
name:
- font-size: 1.2rem
- font-weight: bold
- font-style: italic
cardupload:
card:
show_icon: true
type: custom:button-card
icon: |
[[[
if(entity.state == "off")
return ""
if(entity.attributes.in_progress == false)
return 'mdi:upload-circle'
else return 'mdi:rotate-right'
]]]
styles:
card:
- background: none
- border: none
icon:
- animation: |
[[[
if(entity.attributes.in_progress == false)
return ''
else return 'rotating 1s linear infinite'
]]]
- color: |
[[[
if(entity.state == 'on' & entity.attributes.in_progress != false)
return 'green'
else return 'rgba(85,252,252, 1)'
]]]
- left: 18%
- width: 40%
tap_action:
action: perform-action
perform_action: update.install
target:
entity_id: '[[[return variables.sensor]]]'
exclude: []
card_param: cards
Panneau centrale
type: vertical-stack
cards:
- type: custom:button-card
show_name: false
show_icon: false
show_state: false
card_mod:
style: |
ha-card {
pointer-events: none;
}
styles:
grid:
- grid-template-areas: '"card1 card2 card3"'
- grid-template-columns: 1fr 0.63fr 0.1fr
- grid-template-rows: 1fr
card:
- margin-top: 1.5rem
- padding: 5px 0px 5px 10px
- background: rgba(0,0,0,0)
custom_fields:
card1:
- width: 90%
card2:
- align-self: top
- height: 100%
custom_fields:
card1:
card:
type: custom:mushroom-title-card
title: Addons updates
alignment: start
card_mod:
style: |
.header {
padding: 0px !important;
}
.header div {
margin: 0px !important
}
card2:
card:
type: markdown
content: >-
{% set
rejet=['update.home_assistant_core_update','update.home_assistant_operating_system_update','update.home_assistant_supervisor_update']
%} {% set
maj=integration_entities('hassio')|select('search','update.')|select('is_state','on')|reject('in',rejet)|list|count|int(2)
%} {% set
total=integration_entities('hassio')|select('search','update.')|reject('in',rejet)|list|count|int(2)
%} {% if maj == 0 %} <ha-alert alert-type="success" title="{{maj}}
mise a jour sur {{total}}" > {% elif maj == 1 %} <ha-alert
alert-type="warning" title="{{maj}} mise a jour sur {{total}}" > {%
elif maj > 1 %} <ha-alert alert-type="warning" title="{{maj}} mises
a jour sur {{total}}" ></ha-alert> {% else %} {% endif %}
card_mod:
style: |
:host {
--ha-card-margin: 0px;
--ha-card-background: #00000000 !important;
--ha-card-border-color: #00000000 !important;
}
ha-markdown.no-header {
padding: 0px !important;
margin: 0px !important;
margin-right: 3em !important;
margin-left: -3em !important;
}
ha-card {
font-size: 1rem;
--mdc-icon-size: 1.3rem;
}
- type: custom:auto-entities
card:
type: vertical-stack
card_param: cards
filter:
include:
- domain: update
state: 'on'
options:
type: custom:button-card
show_name: true
show_icon: true
show_state: true
show_entity_picture: true
variables:
sensor: |
[[[
let name = Object.values(entity)
return name[0]
]]]
name: |
[[[
return entity.attributes.friendly_name.replace('Home Assistant','HA').replace('Update','')
]]]
state_display: |
[[[ if(entity.state== "on")
return 'v' + entity.attributes.installed_version +' - v' + entity.attributes.latest_version
else if(entity.state== "off")
return helpers.localize(entity) +' - v'+ entity.attributes.installed_version
else
return "instal - "+entity.attributes.update_percentage+"%"
]]]
styles:
grid:
- grid-template-areas: '"i n n cardupload" "i s s cardupload"'
- grid-template-columns: 0.6fr 1fr 1.6fr 1fr;
- grid-template-rows: repeat(2, 50%);
- gap: 0px 0px;
card:
- padding: 0px
- height: 100%
- width: 100%
icon:
- align-self: center
- left: 25%
- width: 55%
name:
- justify-self: start
- font-size: 0.9em
- font-weight: 450
- padding-top: 8px
state:
- justify-self: start
- font-size: 0.75em
- padding-bottom: 0.7em
custom_fields:
cardupload:
card:
show_icon: true
type: custom:button-card
icon: |
[[[
if(entity.state == "off")
return ""
if(entity.attributes.in_progress == false)
return 'mdi:upload-circle'
else return 'mdi:rotate-right'
]]]
styles:
card:
- background: none
- border: none
icon:
- animation: |
[[[
if(entity.attributes.in_progress == false)
return ''
else return 'rotating 1s linear infinite'
]]]
- color: |
[[[
if(entity.state == 'on' & entity.attributes.in_progress != false)
return 'green'
else return 'rgba(85,252,252, 1)'
]]]
- left: 17%
tap_action:
action: perform-action
perform_action: update.install
target:
entity_id: '[[[return variables.sensor]]]'
exclude:
- name: Home*
- integration: hacs
- integration: mqtt
card_param: cards
- type: custom:button-card
show_name: false
show_icon: false
show_state: false
card_mod:
style: |
ha-card {
pointer-events: none;
}
styles:
grid:
- grid-template-areas: '"card1 card2 card3"'
- grid-template-columns: 1fr 0.63fr 0.1fr
- grid-template-rows: 1fr
card:
- padding: 5px 0px 5px 10px
- background: rgba(0,0,0,0)
custom_fields:
card1:
- width: 90%
card2:
- align-self: top
- height: 100%
custom_fields:
card1:
card:
type: custom:mushroom-title-card
title: HACS updates
alignment: start
card_mod:
style: |
.header {
padding: 0px !important;
}
.header div {
margin: 0px !important
}
card2:
card:
type: markdown
content: >-
{% set
maj=integration_entities('hacs')|select('search','update.')|select('is_state','on')|reject('in','update.hacs_update')|list|count|int(2)
%} {% set
total=integration_entities('hacs')|select('search','update.')|reject('in','update.hacs_update')|list|count|int(2)
%} {% if maj == 0 %} <ha-alert alert-type="success" title="{{maj}}
mise a jour sur {{total}}" > {% elif maj == 1 %} <ha-alert
alert-type="warning" title="{{maj}} mise a jour sur {{total}}" > {%
elif maj > 1 %} <ha-alert alert-type="warning" title="{{maj}} mises
a jour sur {{total}}" ></ha-alert> {% else %} {% endif %}
card_mod:
style: |
:host {
--ha-card-margin: 0px;
--ha-card-background: #00000000 !important;
--ha-card-border-color: #00000000 !important;
}
ha-markdown.no-header {
padding: 0px !important;
margin: 0px !important;
margin-right: 3em !important;
margin-left: -3em !important;
}
ha-card {
font-size: 1rem;
--mdc-icon-size: 1.3rem;
}
- type: markdown
content: >-
{% set maj = states.update |
selectattr('attributes.release_summary','defined') |
selectattr('attributes.release_summary','eq','<ha-alert
alert-type=\'error\'>Restart of Home Assistant required</ha-alert>')
|map(attribute='name') |list %}
{% set maj_count = maj|count|int(2) %}
{% if maj_count >= 1 %} <ha-alert alert-type="error" title="{{maj_count}}
intégrations nécessitent un redémarrage">
<hr>
<ul>{% for i in maj%}
<li>{{i}}</li>
{% endfor%}</ul>
{% else %}
{% endif %}</ha-alert>
card_mod:
style: |
:host {
--ha-card-margin: 0px;
--ha-card-background: #00000000 !important;
--ha-card-border-color: #00000000 !important;
}
ha-markdown.no-header {
padding: 4rem !important;
padding-top: 0rem !important;
padding-bottom: 0rem !important;
}
- type: custom:auto-entities
card:
type: vertical-stack
card_param: cards
filter:
include:
- domain: update
state: 'on'
integration: hacs
options:
type: custom:button-card
show_name: true
show_icon: true
show_state: true
show_entity_picture: true
variables:
url: |
[[[
return entity.attributes.release_url
]]]
sensor: |
[[[
let name = Object.values(entity)
return name[0]
]]]
name: |
[[[
return entity.attributes.friendly_name.replace('update','')
]]]
state_display: |
[[[
if(entity.state== "on" & entity.attributes.in_progress == false)
return entity.attributes.installed_version +' - ' + entity.attributes.latest_version
else if(entity.state== "off")
return helpers.localize(entity) +' - '+ entity.attributes.installed_version
else
return "instal - "+entity.attributes.update_percentage+"%"
]]]
styles:
grid:
- grid-template-areas: '"i n n cardupload" "i s cardurl cardupload"'
- grid-template-columns: 1fr 1fr 1fr 1.5fr;
- grid-template-rows: repeat(2, 50%);
- gap: 0px 0px;
card:
- padding: 0px
- height: 100%
- width: 100%
icon:
- align-self: center
- left: 25%
- width: 55%
name:
- justify-self: start
- font-size: 0.9em
- font-weight: 450
- padding-top: 8px
state:
- justify-self: start
- font-size: 0.75em
- padding-bottom: 0.7em
- padding-right: 8rem
custom_fields:
cardurl:
- justify-self: center
- margin-bottom: 0.7em
- margin-left: 2rem
- margin-right: '-2rem'
custom_fields:
cardurl:
card:
type: custom:button-card
show_icon: false
name: |
[[[
if (variables.url == null)return ""
else
{return '<a style="color:white" href="'+[variables.url]+'">'+[variables.url.substr(8,18).toLowerCase()]+'</a>'}
endif
]]]
tap_action:
action: url
url_path: |
[[[
return variables.url
]]]
styles:
card:
- background: rgba(100,150,255,0.5)
- width: 13rem
- box-sizing: border-box
- padding: 0px
name:
- font-size: 1.2rem
- font-weight: bold
- font-style: italic
cardupload:
card:
show_icon: true
type: custom:button-card
icon: |
[[[
if(entity.state == "off")
return ""
if(entity.attributes.in_progress == false)
return 'mdi:upload-circle'
else return 'mdi:rotate-right'
]]]
styles:
card:
- background: none
- border: none
icon:
- animation: |
[[[
if(entity.attributes.in_progress == false)
return ''
else return 'rotating 1s linear infinite'
]]]
- color: |
[[[
if(entity.state == 'on' & entity.attributes.in_progress != false)
return 'green'
else return 'rgba(85,252,252, 1)'
]]]
- left: 18%
- width: 40%
tap_action:
action: perform-action
perform_action: update.install
target:
entity_id: '[[[return variables.sensor]]]'
exclude:
- entity_id: update.hacs_update
card_param: cards
sort:
method: friendly_name
- type: custom:button-card
show_name: false
show_icon: false
show_state: false
card_mod:
style: |
ha-card {
pointer-events: none;
}
styles:
grid:
- grid-template-areas: '"card1 card2 card3"'
- grid-template-columns: 1fr 0.63fr 0.1fr
- grid-template-rows: 1fr
card:
- padding: 5px 0px 5px 10px
- background: rgba(0,0,0,0)
custom_fields:
card1:
- width: 90%
card2:
- align-self: top
- height: 100%
custom_fields:
card1:
card:
type: custom:mushroom-title-card
title: ZigBee2MQTT
alignment: start
card_mod:
style: |
.header {
padding: 0px !important;
}
.header div {
margin: 0px !important
}
card2:
card:
type: markdown
content: >-
{% set
maj=integration_entities('mqtt')|select('search','update.')|select('is_state','on')|list|count|int(2)
%} {% set
total=integration_entities('mqtt')|select('search','update.')|list|count|int(2)
%} {% if maj == 0 %} <ha-alert alert-type="success" title="{{maj}}
mise a jour sur {{total}}" > {% elif maj == 1 %} <ha-alert
alert-type="warning" title="{{maj}} mise a jour sur {{total}}" > {%
elif maj > 1 %} <ha-alert alert-type="warning" title="{{maj}} mises
a jour sur {{total}}" ></ha-alert> {% else %} {% endif %}
card_mod:
style: |
:host {
--ha-card-margin: 0px;
--ha-card-background: #00000000 !important;
--ha-card-border-color: #00000000 !important;
}
ha-markdown.no-header {
padding: 0px !important;
margin: 0px !important;
margin-right: 3em !important;
margin-left: -3em !important;
}
ha-card {
font-size: 1rem;
--mdc-icon-size: 1.3rem;
}
- type: custom:auto-entities
card:
type: vertical-stack
card_param: cards
filter:
include:
- domain: update
state: 'on'
integration: mqtt
options:
type: custom:button-card
show_name: true
show_icon: true
show_state: true
show_entity_picture: true
variables:
sensor: |
[[[
let name = Object.values(entity)
return name[0]
]]]
name: |
[[[
return entity.attributes.friendly_name.replace('Home Assistant','HA').replace('Update','')
]]]
state_display: >
[[[ if(entity.state== "on" & entity.attributes.in_progress ==
false)
return 'v' + entity.attributes.installed_version +' - v' + entity.attributes.latest_version
else if(entity.state== "off")
return helpers.localize(entity) +' - v'+ entity.attributes.installed_version
else
return "instal - "+entity.attributes.update_percentage+"%"
]]]
styles:
grid:
- grid-template-areas: '"i n n cardupload" "i s s cardupload"'
- grid-template-columns: 0.6fr 1fr 1.6fr 1fr;
- grid-template-rows: repeat(2, 50%);
- gap: 0px 0px;
card:
- padding: 0px
- height: 100%
- width: 100%
icon:
- align-self: center
- left: 25%
- width: 55%
name:
- justify-self: start
- font-size: 0.9em
- font-weight: 450
- padding-top: 8px
state:
- justify-self: start
- font-size: 0.75em
- padding-bottom: 0.7em
custom_fields:
cardupload:
card:
show_icon: true
type: custom:button-card
icon: |
[[[
if(entity.state == "off")
return ""
if(entity.attributes.in_progress == false)
return 'mdi:upload-circle'
else return 'mdi:rotate-right'
]]]
styles:
card:
- background: none
- border: none
icon:
- animation: |
[[[
if(entity.attributes.in_progress == false)
return ''
else return 'rotating 1s linear infinite'
]]]
- color: |
[[[
if(entity.state == 'on' & entity.attributes.in_progress != false)
return 'green'
else return 'rgba(85,252,252, 1)'
]]]
- left: 17%
tap_action:
action: perform-action
perform_action: update.install
target:
entity_id: '[[[return variables.sensor]]]'
exclude: []
card_param: cards
sort:
method: friendly_name
Panneau de droite
type: vertical-stack
cards:
- type: vertical-stack
cards:
- type: custom:mushroom-update-card
entity: update.home_assistant_core_update
show_buttons_control: false
icon_type: entity-picture
layout: horizontal
secondary_info: none
name: Home Assistant Core
card_mod:
style: |
ha-card {
--card-primary-line-height: 2.5rem;
--card-primary-font-size: 1.7rem;
--card-primary-font-weight: normal;
border: none;
box-shadow: none;
background: rgba(0,0,0,0);
margin-top: 1rem;
}
- type: custom:mushroom-chips-card
chips:
- type: template
icon: mdi:web
icon_color: blue
content: Release Changelog
tap_action:
action: url
url_path: https://www.home-assistant.io/latest-release-notes/
- type: entity
entity: sensor.home_assistant_core_cpu_percent
icon_color: blue
- type: entity
entity: sensor.home_assistant_core_memory_percent
icon_color: orange
- type: vertical-stack
cards:
- type: custom:mushroom-update-card
entity: update.home_assistant_supervisor_update
show_buttons_control: false
icon_type: entity-picture
layout: horizontal
secondary_info: none
name: Home Assistant Supervisor
card_mod:
style: |
ha-card {
--card-primary-line-height: 2.5rem;
--card-primary-font-size: 1.7rem;
--card-primary-font-weight: normal;
border: none;
box-shadow: none;
background: rgba(0,0,0,0);
margin-top: 1.2rem;
}
- type: custom:mushroom-chips-card
chips:
- type: template
icon: mdi:web
icon_color: blue
content: Release Changelog
tap_action:
action: url
url_path: https://github.com/home-assistant/supervisor/releases/latest
- type: entity
entity: sensor.home_assistant_supervisor_cpu_percent
icon_color: blue
- type: entity
entity: sensor.home_assistant_supervisor_memory_percent
icon_color: orange
- type: vertical-stack
cards:
- type: custom:mushroom-update-card
entity: update.adguard_home_update
show_buttons_control: false
icon_type: entity-picture
layout: horizontal
secondary_info: none
name: Adguard Home
card_mod:
style: |
ha-card {
--card-primary-line-height: 2.5rem;
--card-primary-font-size: 1.7rem;
--card-primary-font-weight: normal;
border: none;
box-shadow: none;
background: rgba(0,0,0,0);
margin-top: 1.2rem;
}
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: binary_sensor.adguard_home_en_cours_d_execution
icon_color: green
- type: entity
entity: sensor.adguard_home_pourcentage_du_processeur
icon_color: blue
- type: entity
entity: sensor.adguard_home_pourcentage_de_memoire
icon_color: orange
- type: vertical-stack
cards:
- type: custom:mushroom-update-card
entity: update.nginx_proxy_manager_update
show_buttons_control: false
icon_type: entity-picture
layout: horizontal
secondary_info: none
name: Nginx Proxy Manager
card_mod:
style: |
ha-card {
--card-primary-line-height: 2.5rem;
--card-primary-font-size: 1.7rem;
--card-primary-font-weight: normal;
border: none;
box-shadow: none;
background: rgba(0,0,0,0);
margin-top: 1.2rem;
}
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: binary_sensor.nginx_proxy_manager_en_cours_d_execution
icon_color: green
- type: entity
entity: sensor.nginx_proxy_manager_pourcentage_du_processeur
icon_color: blue
- type: entity
entity: sensor.nginx_proxy_manager_pourcentage_de_memoire
icon_color: orange
- type: vertical-stack
cards:
- type: custom:mushroom-update-card
entity: update.mosquitto_broker_update
show_buttons_control: false
icon_type: entity-picture
layout: horizontal
secondary_info: none
name: Mosquitto Broker
card_mod:
style: |
ha-card {
--card-primary-line-height: 2.5rem;
--card-primary-font-size: 1.7rem;
--card-primary-font-weight: normal;
border: none;
box-shadow: none;
background: rgba(0,0,0,0);
margin-top: 1.2rem;
}
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: binary_sensor.mosquitto_broker_en_cours_d_execution
icon_color: green
- type: entity
entity: sensor.mosquitto_broker_pourcentage_du_processeur
icon_color: blue
- type: entity
entity: sensor.mosquitto_broker_pourcentage_de_memoire
icon_color: orange
- type: vertical-stack
cards:
- type: custom:mushroom-update-card
entity: update.zigbee2mqtt_update
show_buttons_control: false
icon_type: entity-picture
layout: horizontal
secondary_info: none
name: ZigBee2MQTT
card_mod:
style: |
ha-card {
--card-primary-line-height: 2.5rem;
--card-primary-font-size: 1.7rem;
--card-primary-font-weight: normal;
border: none;
box-shadow: none;
background: rgba(0,0,0,0);
margin-top: 1.2rem;
}
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: binary_sensor.zigbee2mqtt_en_cours_d_execution
icon_color: green
- type: entity
entity: sensor.zigbee2mqtt_pourcentage_du_processeur
icon_color: blue
- type: entity
entity: sensor.zigbee2mqtt_pourcentage_de_memoire
icon_color: orange
- type: vertical-stack
cards:
- type: custom:mushroom-update-card
entity: update.influxdb_update
show_buttons_control: false
icon_type: entity-picture
layout: horizontal
secondary_info: none
name: InfluxDB
card_mod:
style: |
ha-card {
--card-primary-line-height: 2.5rem;
--card-primary-font-size: 1.7rem;
--card-primary-font-weight: normal;
border: none;
box-shadow: none;
background: rgba(0,0,0,0);
margin-top: 1.2rem;
}
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: binary_sensor.influxdb_en_cours_d_execution
icon_color: green
- type: entity
entity: sensor.influxdb_pourcentage_du_processeur
icon_color: blue
- type: entity
entity: sensor.influxdb_pourcentage_de_memoire
icon_color: orange
C’est très propre. Serait-il possible de partager le code du sensor.available_updates ?








