Панель отображений версий в системе HomeAssistant

Не знаю как более точно назвать тему … но пока так 🙂 Определим из системы версии наших устройств и сервисов. У меня их несколько : HomeAssistant, Tasmota, Zigbee2MQTT, HACS. Потребуется установить две карточки из HACS : mushroom и mushroom-themes

Устанавливаем и приступаем.

HomeAssistant Server

cards:
  - type: vertical-stack
#    title: Обновления для Home Assistant
    cards:
      - type: custom:mushroom-title-card
        title: Home Assistant Server
        subtitle: >
          Ядро v{{ state_attr('update.home_assistant_core_update',
          'installed_version') }} - Супервизор
          v{{ state_attr('update.home_assistant_supervisor_update',
          'installed_version') }}

      - type: custom:mushroom-chips-card
        chips:
          - type: entity
            entity: sensor.processor_temperature
            icon_color: orange
          - type: entity
            entity: sensor.processor_use
            icon_color: blue
          - type: entity
            entity: sensor.memory_use_percent
            icon_color: orange
          - type: entity
            entity: sensor.disk_use_percent
            icon_color: green

      - 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
          - 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 %}

      - 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 %}

Zigbee2MQTT

      - type: custom:mushroom-title-card
        title: ZigBee2MQTT
        subtitle: >-
          Текущая v{{ states('sensor.zigbee2mqtt_version') }} - Последняя v{{
          states('sensor.zigbee2mqtt_newest_version') }}  
      - type: custom:mushroom-chips-card
        chips:
          - type: entity
            entity: binary_sensor.zigbee2mqtt_running
            icon_color: green
          - type: entity
            entity: sensor.zigbee2mqtt_version
            icon_color: green
            icon: mdi:package-variant-closed
          - type: entity
            entity: sensor.zigbee2mqtt_cpu_percent
            icon_color: blue
          - type: entity
            entity: sensor.zigbee2mqtt_memory_percent
            icon_color: orange
      - type: custom:mushroom-update-card
        entity: update.zigbee2mqtt_update
        show_buttons_control: true
        icon_type: entity-picture
        layout: horizontal

TASMOTA

должна доступна быть интеграция в HA

      - type: custom:mushroom-title-card
        title: Tasmota
        subtitle: >-
          Текущая v{{ states('sensor.tasmota_current_fw_sonoffpowr2') }} - Последняя v{{
          states('sensor.tasmota_latest_version') }}  
      - type: entities
        state_color: true
        entities:
        - entity: sensor.sonoff4chpror2_firmware_version
          name: Гараж (4кл. Выключатель)
          icon: mdi:alpha-s-box-outline
        - entity: sensor.sonoffpowr21_firmware_version
          name: Гараж (оборудование)
          icon: mdi:alpha-s-box-outline

HACS

      - type: custom:mushroom-title-card
        title: HACS Updates
        subtitle: >-
          Текущая v{{ state_attr('update.hacs_update', 'installed_version') }} -
          Последняя v{{ state_attr('update.hacs_update', 'latest_version') }}
      - 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
      - type: custom:mushroom-update-card
        entity: update.hacs_update
        layout: horizontal
        show_buttons_control: true

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Межтекстовые Отзывы
Посмотреть все комментарии
0
Оставьте комментарий! Напишите, что думаете по поводу статьи.x