Carte automatique pour suivi des batteries

On peut même faire des cartes decluterring qui utilisent des cartes decluterring :smiling_face_with_three_hearts:

  bar-card_percent_generic:
    element:
      type: custom:auto-entities
      card:
        type: custom:bar-card
        title_position: inside
        height: 38
        card_mod: null
        positions:
          icon: inside
          indicator: inside
          name: inside
          value: inside
        show_icon: true
        align: split
        columns: '[[column]]'
        max: 100
        unit_of_measurement: '%'
        severity: '[[severity]]'
        style: |
          bar-card-currentbar, bar-card-current, bar-card-backgroundbar {

              height: 5px !important;
              margin-top: 30px;
          }
          ha-card {
              background: none;
              box-shadow: none;
          }
          ha-icon{
            color: white !important;
          }
          bar-card-iconbar {
              margin-bottom: 10px;
          }
        animation:
          state: 'on'
          speed: '2'
      filter:
        exclude: '[[entity_exc]]'
        include: '[[entity_inc]]'
  bar-card_percent_higherbetter_step20:
    element:
      type: custom:decluttering-card
      template: bar-card_percent_generic
      variables:
        - column: '[[column]]'
        - entity_exc: '[[entity_exc]]'
        - entity_inc: '[[entity_inc]]'
        - severity:
            - color: '#d11e1e'
              from: 0
              to: 5
            - color: '#cf2d11'
              from: 6
              to: 10
            - color: '#cc3900'
              from: 11
              to: 15
            - color: '#c84400'
              from: 16
              to: 20
            - color: '#c44d00'
              from: 21
              to: 25
            - color: '#bf5600'
              from: 26
              to: 30
            - color: '#b95f00'
              from: 31
              to: 35
            - color: '#b36600'
              from: 36
              to: 40
            - color: '#ac6e00'
              from: 41
              to: 45
            - color: '#a57500'
              from: 46
              to: 50
            - color: '#9d7b00'
              from: 51
              to: 55
            - color: '#948100'
              from: 56
              to: 60
            - color: '#8b8700'
              from: 61
              to: 65
            - color: '#818d00'
              from: 66
              to: 70
            - color: '#769200'
              from: 71
              to: 75
            - color: '#6a9700'
              from: 76
              to: 80
            - color: '#5d9c00'
              from: 81
              to: 85
            - color: '#4da100'
              from: 86
              to: 90
            - color: '#39a500'
              from: 91
              to: 95
            - color: '#15a911'
              from: 96
              to: 100
  bar-card_percent_lowerbetter_step5:
    element:
      type: custom:decluttering-card
      template: bar-card_percent_generic
      variables:
        - column: '[[column]]'
        - entity_exc: '[[entity_exc]]'
        - entity_inc: '[[entity_inc]]'
        - severity:
          - color: '#d93131'
            from: 81
            to: 100
          - color: '#c45800'
            from: 61
            to: 80
          - color: '#a07500'
            from: 41
            to: 60
          - color: '#6f8b00'
            from: 21
            to: 40
          - color: '#0f9b0f'
            from: 0
            to: 20