# Maj de HACS version 1.34, vers la version 2.0. procédure d'installation?

**URL:** <https://forum.hacf.fr/t/maj-de-hacs-version-1-34-vers-la-version-2-0-procedure-dinstallation/46439>\
**Category:** Entraide Home Assistant\
**Tags:** integration, hacs, aide\
**Created:** [Août 22, 2024, 4:09 UTC](https://forum.hacf.fr/t/maj-de-hacs-version-1-34-vers-la-version-2-0-procedure-dinstallation/46439 "2024-08-22T04:09:31Z")\
**Posts on this page:** 1\
**Showing post:** 72

<div class="post-metadata">

**Author:** ![mrgrlscz](https://forum.hacf.fr/user_avatar/forum.hacf.fr/mrgrlscz/32/56240_2.png) [@mrgrlscz](https://forum.hacf.fr/u/mrgrlscz)\
**Post date:** [Août 25, 2024, 10:28 UTC](https://forum.hacf.fr/t/maj-de-hacs-version-1-34-vers-la-version-2-0-procedure-dinstallation/46439/72 "2024-08-25T22:28:16Z")

</div>

Finalement j’ai quand même fait la carte des updates disponibles, ça donne ça dans un pop-up `bubble-card`:

 ![image](https://forum.hacf.fr/uploads/default/original/3X/f/8/f8e82ede4c53a70476f7383c9ad40f6f9516d4b3.png)

> **sensor**
>
> ```auto
> # ------------------------------------------------------------------------------
> # ------------------------------------------------------------------------------
> # -------------------------------------------------------------------- available
> 
> - name: tplt_available_updates_system
> state: |
> {% set var = states.update
> |selectattr('state', 'equalto', 'on')
> |select('search', 'home_assistant')
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> - name: tplt_available_updates_addon
> state: |
> {% set var = states.update
> |selectattr('state', 'equalto', 'on')
> |selectattr('attributes.supported_features', 'equalto', 25)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> - name: tplt_available_updates_hacs
> state: |
> {% set var = states.update
> |selectattr('state', 'equalto', 'on')
> |selectattr('attributes.supported_features', 'equalto', 23)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> 
> # ------------------------------------------------------------------------------
> # ------------------------------------------------------------------------------
> # ---------------------------------------------------------------------- skipped
> 
> - name: tplt_skipped_updates_system
> state: |
> {% set var = states.update
> |select('search', 'home_assistant')
> |selectattr('attributes.skipped_version', 'ne', none)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> - name: tplt_skipped_updates_addon
> state: |
> {% set var = states.update
> |selectattr('attributes.supported_features', 'equalto', 25)
> |selectattr('attributes.skipped_version', 'ne', none)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> - name: tplt_skipped_updates_hacs
> state: |
> {% set var = states.update
> |selectattr('attributes.supported_features', 'equalto', 23)
> |selectattr('attributes.skipped_version', 'ne', none)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> 
> ```

> **binary\_sensor**
>
> ```auto
> # ======================================================================================
> # ======================================================================================
> # ============================================================================== UPDATES
> 
> - name: tplt_update_restart
> icon: mdi:restart-alert
> device_class: update
> state: |
> {% set var = states.update
> |selectattr('attributes.release_summary', 'search', 'Restart of Home Assistant required')
> |map(attribute='entity_id')
> |list %}
> {% set nr_count = var |length %}
> {% if nr_count == 0 %}
> off
> {% else %}
> on
> {% endif %}
> attributes:
> list: |
> {% set var = states.update
> |selectattr('attributes.release_summary', 'search', 'Restart of Home Assistant required')
> |map(attribute='attributes.friendly_name')
> |map('replace', 'Update', '')
> |map('replace', 'update', '')
> |list %}
> {% set nr_count = var | length %}
> {% if nr_count == 0 %}
> null
> {% else %}
> {{ var | join('et ') }}{{ 'nécessite' if nr_count == 1 else 'nécessitent' }} un redémarrage.
> {% endif %}
> # {% set var = states.update
> # |selectattr('attributes.release_summary', 'search', 'Restart of Home Assistant required')
> # |map(attribute='attributes.friendly_name')
> # |map('replace', 'Update', '')
> # |map('replace', 'update', '')
> # |list %}
> # {% set nr_count = var |length %}
> # {% if nr_count == 0 %}
> # null
> # {% else %}
> # {% set nr_joined = var |join('\n'+' ') %}
> # {{" "}}{{ nr_joined }}
> # {% endif %}
> 
> - name: tplt_available_updates
> icon: mdi:update
> device_class: update
> state: |
> {% set var = states.update
> |selectattr('state', 'equalto', 'on')
> |reject('search','Swiss Army Knife custom card')
> |map(attribute='attributes.friendly_name')
> |map('replace', 'Update', '')
> |map('replace', 'update', '')
> |list %}
> {% set result = var |length %}
> {% if result == 0 %}
> off
> {% else %}
> on
> {% endif %}
> 
> - name: tplt_skipped_updates
> icon: mdi:debug-step-over
> device_class: update
> state: |
> {% set var = states.update
> |selectattr('attributes.skipped_version', 'ne', none)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {% if result == 0 %}
> off
> {% else %}
> on
> {% endif %}
> attributes:
> count_all: |
> {% set var = states.update
> |selectattr('attributes.skipped_version', 'ne', none)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> count_system: |
> {% set var = states.update
> |select('search', 'home_assistant')
> |selectattr('attributes.skipped_version', 'ne', none)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> count_addon: |
> {% set var = states.update
> |selectattr('attributes.supported_features', 'equalto', 25)
> |selectattr('attributes.skipped_version', 'ne', none)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> count_hacs: |
> {% set var = states.update
> |selectattr('attributes.supported_features', 'equalto', 23)
> |selectattr('attributes.skipped_version', 'ne', none)
> |map(attribute='entity_id')
> |list %}
> {% set result = var |length %}
> {{ result }}
> list: |
> {% set var = states.update
> |selectattr('attributes.skipped_version', 'ne', none)
> |map(attribute='attributes.friendly_name')
> |map('replace', 'Update', '')
> |map('replace', 'update', '')
> |list %}
> {% set result = var |join('\n'+' ') %}
> {{ result }}
> 
> ```

> **pop-up**
>
> ```auto
> ### ================================================================== UPDATES
> - type: vertical-stack
> cards:
> - type: custom:bubble-card
> card_type: pop-up 
> hash: "#update"
> name: Mises à jour
> icon: mdi:update
> close_on_click: false
> sub_button:
> - entity: switch.hacs_pre_release
> name: Beta
> show_name: false
> icon: ''
> show_state: true
> show_last_changed: false
> show_attribute: false
> tap_action:
> action: toggle
> show_icon: false
> show_background: true
> # ------------------------------------------ cards
> - type: conditional
> conditions:
> - condition: state
> entity: binary_sensor.tplt_available_updates
> state: 'on'
> card:
> type: vertical-stack
> cards:
> - type: custom:bubble-card
> card_type: separator
> name: "Mise(s) à jour disponible(s):"
> <<: &separator
> styles: |-
> ha-card { color: var(--primary-background-color); }
> .bubble-line {
> background: var(--primary-background-color);
> opacity: 0.2;
> }
> - !include ../cards/card_update_available.yaml
> # ------------------------------------------ cards
> - type: conditional
> conditions:
> - condition: state
> entity: binary_sensor.tplt_skipped_updates
> state: 'on'
> card:
> type: vertical-stack
> cards:
> - type: custom:bubble-card
> card_type: separator
> name: "Mise(s) à jour ignorée(s):"
> <<: *separator
> - !include ../cards/card_update_skipped.yaml 
> 
> ```

> **card\_update\_available.yaml**
>
> ```auto
> type: custom:stack-in-card
> card_mod:
> class: stock
> cards:
> 
> # ===================================================================== SYSTEM UPDATES
> - type: conditional
> conditions:
> - condition: state
> entity: sensor.tplt_available_updates_system
> state_not: '0'
> card:
> type: custom:auto-entities
> filter:
> include: &include
> - entity_id: update.*
> state: 'on'
> exclude:
> - entity_id: update.*
> attributes:
> device_class: firmware
> - entity_id: update.*
> attributes:
> supported_features: 23
> - entity_id: update.*
> attributes:
> supported_features: 25
> card:
> <<: &card
> type: custom:flex-table-card
> card_mod:
> class: stock
> style: |
> table {
> padding: 4px;
> }
> sort_by: friendly_name+
> clickable: true
> columns:
> - <<: &col1
> data: entity_picture
> align: center
> name: ''
> modify: '''<img src="'' + x + ''"style="height:30px;width:30px">'''
> - <<: &col2
> name: ''
> data: friendly_name
> align: left
> modify: |-
> x = x.replace('Update', '');
> x;
> name: Système
> - <<: &col3
> data: installed_version
> name: Actuelle
> align: right
> - <<: &col4
> data: latest_version
> name: Disponible
> align: right
> css: &css
> thead th: 'color: var(--text);'
> tbody tr: 'background-color: transparent !important;'
> tbody tr td:nth-child(1): 'width: 32px;'
> tbody tr td:nth-child(3): 'width: 64px; font-weight: bold;'
> tbody tr td:nth-child(4): 'width: 64px; color: var(--success-color); font-weight: bold;'
> 
> # ===================================================================== ADD-ON UPDATES
> - type: conditional
> conditions:
> - condition: state
> entity: sensor.tplt_available_updates_addon
> state_not: '0'
> card:
> type: custom:auto-entities
> filter:
> include: *include
> exclude:
> - entity_id: update.*
> attributes:
> device_class: firmware
> - entity_id: update.*
> attributes:
> supported_features: 23
> - entity_id: update.home_assistant_core_update
> - entity_id: update.home_assistant_operating_system_update
> - entity_id: update.home_assistant_supervisor_update
> card:
> <<: *card
> columns:
> - <<: *col1
> - <<: *col2
> name: Module comp.
> - <<: *col3
> - <<: *col4
> css: *css
> 
> # ======================================================================= HACS UPDATES
> - type: conditional
> conditions:
> - condition: state
> entity: sensor.tplt_available_updates_hacs
> state_not: '0'
> card:
> type: custom:auto-entities
> filter:
> include: *include
> exclude:
> - entity_id: update.*
> attributes:
> device_class: firmware
> - entity_id: update.*
> attributes:
> supported_features: 25
> - entity_id: update.swiss_army_knife_custom_card_update
> - entity_id: update.home_assistant_core_update
> - entity_id: update.home_assistant_operating_system_update
> - entity_id: update.home_assistant_supervisor_update
> card:
> <<: *card
> columns:
> - <<: *col1
> - <<: *col2
> name: HACS
> modify: |-
> x = x.replace('update', '');
> x;
> - <<: *col3
> - <<: *col4
> css: *css
> 
> ```

> **card\_update\_skipped.yaml**
>
> ```auto
> type: custom:stack-in-card
> card_mod:
> class: stock
> cards:
> 
> # ===================================================================== SYSTEM UPDATES
> - type: conditional
> conditions:
> - condition: state
> entity: sensor.tplt_skipped_updates_system
> state_not: '0'
> card:
> type: custom:auto-entities
> filter:
> include: &include
> - entity_id: update.*
> state: 'off'
> exclude:
> - entity_id: update.*
> attributes:
> skipped_version: null
> - entity_id: update.*
> attributes:
> device_class: firmware
> - entity_id: update.*
> attributes:
> supported_features: 23
> - entity_id: update.*
> attributes:
> supported_features: 25
> card:
> <<: &card
> type: custom:flex-table-card
> card_mod:
> class: stock
> style: |
> table {
> padding: 4px;
> }
> sort_by: friendly_name+
> clickable: true
> columns:
> - <<: &col1
> data: entity_picture
> align: center
> name: ''
> modify: '''<img src="'' + x + ''"style="height:30px;width:30px">'''
> - <<: &col2
> name: ''
> data: friendly_name
> align: left
> modify: |-
> x = x.replace('Update', '');
> x;
> name: Système
> - <<: &col3
> data: installed_version
> name: Actuelle
> align: right
> - <<: &col4
> data: skipped_version
> name: Ignorée
> align: right
> css: &css
> thead th: 'color: var(--text);'
> tbody tr: 'background-color: transparent !important;'
> tbody tr td:nth-child(1): 'width: 32px;'
> tbody tr td:nth-child(3): 'width: 64px; font-weight: bold;'
> tbody tr td:nth-child(4): 'width: 64px; color: var(--nova-color); font-weight: bold;'
> 
> # ===================================================================== ADD-ON UPDATES
> - type: conditional
> conditions:
> - condition: state
> entity: sensor.tplt_skipped_updates_addon
> state_not: '0'
> card:
> type: custom:auto-entities
> filter:
> include: *include
> exclude:
> - entity_id: update.*
> attributes:
> skipped_version: null
> - entity_id: update.*
> attributes:
> device_class: firmware
> - entity_id: update.*
> attributes:
> supported_features: 23
> - entity_id: update.home_assistant_core_update
> - entity_id: update.home_assistant_operating_system_update
> - entity_id: update.home_assistant_supervisor_update
> card:
> <<: *card
> columns:
> - <<: *col1
> - <<: *col2
> name: Module comp.
> - <<: *col3
> - <<: *col4
> css: *css
> 
> # ======================================================================= HACS UPDATES
> - type: conditional
> conditions:
> - condition: state
> entity: sensor.tplt_skipped_updates_hacs
> state_not: '0'
> card:
> type: custom:auto-entities
> filter:
> include: *include
> exclude:
> - entity_id: update.*
> attributes:
> skipped_version: null
> - entity_id: update.*
> attributes:
> device_class: firmware
> - entity_id: update.*
> attributes:
> supported_features: 25
> - entity_id: update.home_assistant_core_update
> - entity_id: update.home_assistant_operating_system_update
> - entity_id: update.home_assistant_supervisor_update
> card:
> <<: *card
> columns:
> - <<: *col1
> - <<: *col2
> name: HACS
> modify: |-
> x = x.replace('update', '');
> x;
> - <<: *col3
> - <<: *col4
> css: *css
> 
> ```

---

_[View the full topic](https://forum.hacf.fr/t/maj-de-hacs-version-1-34-vers-la-version-2-0-procedure-dinstallation/46439)._
