Samba Backup card

Passend zu Simons Thema will ich hier meine backup card teilen.
Es werden die mushroom cards benötigt, hier benutze ich die template card.

Sie zeigt alles wichtige an, bei einem Klick auf die Karte wird ein manuelles Backup gestartet. Bei “hold” wird das addon neu gestartet.
Je nach Zustand ändert sich das icon und die Farbe. Samba Backup stell iwan immer auf idel um, somit ist ein Fehler leider nur durch die stats ersichtlich, da die icon iwan auf idle umstellen.


type: custom:mushroom-template-card
primary: >-
  Last backup: {{ state_attr('sensor.samba_backup', 'last_backup') |
  as_timestamp | timestamp_custom('%d.%m.%Y - %H:%M') }}
secondary: >-
  NAS: {{state_attr('sensor.samba_backup','backups_remote')}} | Local: {{
  state_attr('sensor.samba_backup','backups_local') }} | Check:
  {{state_attr('sensor.samba_backup','total_backups_succeeded')}} | Failed:
  {{state_attr('sensor.samba_backup','total_backups_failed')}}  
icon: |-
  {% if is_state('sensor.samba_backup', 'RUNNING') %}
            mdi:progress-check
          {% elif is_state('sensor.samba_backup', 'FAILED') %}
            mdi:alert-circle-outline
          {% elif is_state('sensor.samba_backup', 'SUCCESSFUL') %}
            mdi:check-circle-outline
          {% else %}
            mdi:sleep
          {% endif %}
icon_color: |-
  {% if is_state('sensor.samba_backup', 'FAILED') %}
            red
          {% elif is_state('sensor.samba_backup', 'SUCCESSFUL') %}
            green
          {% elif is_state('sensor.samba_backup', 'RUNNING') %}
            orange
          {% else %}
            blue
          {% endif %}
multiline_secondary: false
fill_container: false
tap_action:
  action: call-service
  service: hassio.addon_stdin
  data:
    addon: 15d21743_samba_backup
    input: trigger
hold_action:
  action: call-service
  service: hassio.addon_restart
  data:
    addon: 15d21743_samba_backup
  target: {}
entity: sensor.samba_backup

3 „Gefällt mir“

Danke fürs teilen.
Hab nur ein kleines Problem: bei mir ist kein sensor.samba_backup vorhanden (auch nicht deaktiviert). Das Backup selber funktioniert problemlos.

Edit: Anscheinend muss man nach einem Neustart von HA das Addon nochmals neustarten, dann taucht der Sensor wieder auf.

danke erstmal,

wo fügt man das den ein?

In eine neue Karte am Dashboard. In dem Fall brauchst du aber Mushroom Cards im HACS Frontend.

super, klappt, wieder was gelernt

danke