Integration Garbage qui a disparu de HA?

J’ai crée les input texte et l’automatisme (il faudra certainement que je le modifie, car j’ai 2 ramassage par semaine pour le ménager…dons le reset à 7 jours n’est pas bon je pense)

J’ai modifier le code de ma carte existante, mais c’est pas bon…je n’ai pas les jours
voici le résultat :
garbage_9
alors que je devrais avoir ceci:
garbage_10

code
type: custom:button-card
entity: sensor.poubelle_bleu_jour
size: 50%
aspect_ratio: 1/1
name: Selectif
show_label: true
show_state: false
state:
  - operator: template
    value: |
      [[[
        return states['sensor.poubelle_bleu_jour'].attributes.days == 1
      ]]]
    styles:
      card:
        - background-color: auto
        - color: auto
        - animation: blink 10s infinite
label: |
  [[[
    var days = states['sensor.poubelle_bleu_jour'].attributes.days;
    var label = "Sortir dans " + (days-1) + " jours";
    switch (days) {
      case 0:
        label = 'Sortie hier soir';
        break;
      case 1:
        label = 'Sortir ce soir';
        break;
      case 2:
        label = 'Sortir demain soir';
        break;
    }
    return label;
  ]]]
styles:
  card:
    - border-radius: 10%
    - border: 2px solid grey
  icon:
    - color: blue
  name:
    - font-size: 10px
    - white-space: normal
  label:
    - font-size: 10px
    - white-space: normal

je viens de rajouter la carte @warc0zes mais j’ai l’erreur suivante :

Merci pour votre aide

Normale, ton code commence par - type: horizontal-stack. J’ai copier coller mon code sans reformater ( je l’utilise dans un stack in card ). Il te suffit de supprimer le - devant type: horizontal-stack

    type: horizontal-stack
    cards:
      - type: custom:button-card
        entity: sensor.poubelle_verte_jour
        ...

Oui, faut modifier l’automatisation et adapter.

tu trouve cela ou, car je la trouve pas dans hacs


Dans HACS et intégration. Tu recherche fontawesome et tu installe.
Redémarre HA, puis va dans paramètre / appareils et services et fait ajouter une intégration. Recherche fontawesome icon et installe. C’est fini :sweat_smile:

C’est normalement bon pour fontawesome (en tous cas je le vois dans intégration)
Mais j’ai l’affichage suivant sa me parait pas normal…

Ta pas la carte card-templater d’installer , a partir de hacs. C’est le code de @telenaze , pas le mien.

Oui j’ai mis les 2 versions pour essayer, mais pour card templater :
Il me dit quelle exist dans le store, mais je la trouve pas…décidément Hacs je m’y ferais jamais :woozy_face:

Le tiens c’est normal que ce soit pas centrer et j’ai pas le même résultat que tes screen
Je m’attendais a quelquechose de ce genre :
poubelle button card4

le gros icone n’apparait pas sur le mien ??

C’est bon pour la card je pense avoir reussi

J’ai redémarré une énième fois et c’est apparu…

1 « J'aime »

Les joies de HA :rofl: :rofl: :sweat_smile:

bon sa progresse…au bout de 2 jours :grin: (heureusement qu’en electrecité et plomberie je suis plus rapide… :rofl:)

Alors c’est beaucoup mieux, mais :
Pour la carte à @telenaze il me manque les images…je pense

Pour la carte à @warc0zes j’ai un problème dans les couleurs !
la jaune est noir, la bleu est jaune

code
square: false
type: grid
cards:
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        entity: sensor.poubelle_verte_jour
        name: Poubelle Verte
        icon: fas:dumpster
        layout: icon_name_state2nd
        show_state: true
        size: 60%
        custom_fields:
          date: |
            [[[ 
              return 'Le ' + states['sensor.poubelle_verte_jour'].attributes.date;
            ]]]
          statut: >
            [[[ if (states['input_text.poubelle_verte_vegetaux_statut'].state ==
            "Vider") return '<ha-icon icon="mdi:delete" style="width: 30px;
            height: 30px; color: green;"></ha-icon>'; else return '<ha-icon
            icon="mdi:delete-alert" style="width: 30px; height: 30px; color:
            red"></ha-icon>' ]]]             
        state:
          - value: Dans 7 Jours
            operator: '=='
            color: green
            styles:
              state:
                - color: green
          - value: Dans 6 Jours
            operator: '=='
            color: green
            styles:
              state:
                - color: green
          - value: Dans 5 Jours
            operator: '=='
            color: green
            styles:
              state:
                - color: green
          - value: Dans 4 Jours
            operator: '=='
            color: green
            styles:
              state:
                - color: green
          - value: Dans 3 Jours
            operator: '=='
            color: green
            styles:
              state:
                - color: green
          - value: Dans 2 Jours
            operator: '=='
            color: green
            styles:
              state:
                - color: green
          - value: Demain
            operator: '=='
            color: orange
            icon: mdi:delete-restore
            styles:
              state:
                - color: orange
          - value: Aujourd'hui
            operator: '=='
            color: red
            icon: mdi:delete-restore
            styles:
              state:
                - color: red
        styles:
          icon:
            - margin-left: 32px
          name:
            - margin-left: 6px
            - justify-self: start
            - font-size: 15px
          state:
            - font-weight: bold
            - margin-left: 6px
            - justify-self: start
            - font-size: 12px
          custom_fields:
            date:
              - top: 73%
              - left: 43%
              - position: absolute
              - color: red
              - font-size: 12px
            statut:
              - top: 50%
              - left: 78%
              - position: absolute
              - color: red
              - font-size: 12px
        hold_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.poubelle_verte_vegetaux_statut
            value: Vider
        card_mod:
          style: |
            ha-card {
              margin-top: -8px;
            }             
      - type: custom:button-card
        entity: sensor.poubelle_jaune_jour
        name: Poubelle Jaune
        icon: fas:dumpster
        layout: icon_name_state2nd
        show_state: true
        size: 60%
        custom_fields:
          date: |
            [[[ 
              return 'Le ' + states['sensor.poubelle_jaune_jour'].attributes.date;
            ]]]
          statut: >
            [[[ if (states['input_text.poubelle_jaune_monstres_statut'].state ==
            "Vider") return '<ha-icon icon="mdi:delete" style="width: 30px;
            height: 30px; color: green;"></ha-icon>'; else return '<ha-icon
            icon="mdi:delete-alert" style="width: 30px; height: 30px; color:
            red"></ha-icon>' ]]]                       
        state:
          - value: Dans 7 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 6 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 5 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 4 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 3 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 2 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Demain
            operator: '=='
            color: orange
            icon: mdi:delete-restore
            styles:
              state:
                - color: orange
          - value: Aujourd'hui
            operator: '=='
            color: red
            icon: mdi:delete-restore
            styles:
              state:
                - color: red
        styles:
          icon:
            - margin-left: 32px
          name:
            - margin-left: 6px
            - justify-self: start
            - font-size: 15px
          state:
            - font-weight: bold
            - margin-left: 6px
            - justify-self: start
            - font-size: 12px
          custom_fields:
            date:
              - top: 73%
              - left: 43%
              - position: absolute
              - color: red
              - font-size: 12px
            statut:
              - top: 50%
              - left: 78%
              - position: absolute
              - color: red
              - font-size: 12px
        hold_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.poubelle_jaune_monstres_statut
            value: Vider
        card_mod:
          style: |
            ha-card {
              margin-top: -8px;
            }
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        entity: sensor.poubelle_marron_jour
        name: Poubelle Marron
        icon: fas:dumpster
        layout: icon_name_state2nd
        show_state: true
        size: 60%
        custom_fields:
          date: |
            [[[ 
              return 'Le ' + states['sensor.poubelle_marron_jour'].attributes.date;
            ]]]
          statut: >
            [[[ if (states['input_text.poubelle_marron_menager_statut'].state ==
            "Vider") return '<ha-icon icon="mdi:delete" style="width: 30px;
            height: 30px; color: green;"></ha-icon>'; else return '<ha-icon
            icon="mdi:delete-alert" style="width: 30px; height: 30px; color:
            red"></ha-icon>' ]]]                       
        state:
          - value: Dans 7 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 6 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 5 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 4 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 3 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 2 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Demain
            operator: '=='
            color: orange
            icon: mdi:delete-restore
            styles:
              state:
                - color: orange
          - value: Aujourd'hui
            operator: '=='
            color: red
            icon: mdi:delete-restore
            styles:
              state:
                - color: red
        styles:
          icon:
            - margin-left: 32px
          name:
            - margin-left: 6px
            - justify-self: start
            - font-size: 15px
          state:
            - font-weight: bold
            - margin-left: 6px
            - justify-self: start
            - font-size: 12px
          custom_fields:
            date:
              - top: 73%
              - left: 43%
              - position: absolute
              - color: red
              - font-size: 12px
            statut:
              - top: 50%
              - left: 78%
              - position: absolute
              - color: red
              - font-size: 12px
        hold_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.poubelle_marron_menager_statut
            value: Vider
        card_mod:
          style: |
            ha-card {
              margin-top: -8px;
            }
      - type: custom:button-card
        entity: sensor.poubelle_bleu_jour
        name: Poubelle bleu tri
        icon: fas:dumpster
        layout: icon_name_state2nd
        show_state: true
        size: 60%
        custom_fields:
          date: |
            [[[ 
              return 'Le ' + states['sensor.poubelle_bleu_jour'].attributes.date;
            ]]]
          statut: >
            [[[ if (states['input_text.poubelle_bleu_tri_statut'].state ==
            "Vider") return '<ha-icon icon="mdi:delete" style="width: 30px;
            height: 30px; color: green;"></ha-icon>'; else return '<ha-icon
            icon="mdi:delete-alert" style="width: 30px; height: 30px; color:
            red"></ha-icon>' ]]]                       
        state:
          - value: Dans 7 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 6 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 5 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 4 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 3 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 2 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Demain
            operator: '=='
            color: orange
            icon: mdi:delete-restore
            styles:
              state:
                - color: orange
          - value: Aujourd'hui
            operator: '=='
            color: red
            icon: mdi:delete-restore
            styles:
              state:
                - color: red
        styles:
          icon:
            - margin-left: 32px
          name:
            - margin-left: 6px
            - justify-self: start
            - font-size: 15px
          state:
            - font-weight: bold
            - margin-left: 6px
            - justify-self: start
            - font-size: 12px
          custom_fields:
            date:
              - top: 73%
              - left: 43%
              - position: absolute
              - color: red
              - font-size: 12px
            statut:
              - top: 50%
              - left: 78%
              - position: absolute
              - color: red
              - font-size: 12px
        hold_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.poubelle_bleu_tri_statut
            value: Vider
        card_mod:
          style: |
            ha-card {
              margin-top: -8px;
            }
columns: 1

Dans la partie state: , modifie la couleur suivant la poubelle.

Pourtant dans la carte « poubelle jaune » il n’y a pas de black !!

     - type: custom:button-card
        entity: sensor.poubelle_jaune_jour
        name: Poubelle Jaune
        icon: fas:dumpster
        layout: icon_name_state2nd
        show_state: true
        size: 60%
        custom_fields:
          date: |
            [[[ 
              return 'Le ' + states['sensor.poubelle_jaune_jour'].attributes.date;
            ]]]
          statut: >
            [[[ if (states['input_text.poubelle_jaune_monstres_statut'].state ==
            "Vider") return '<ha-icon icon="mdi:delete" style="width: 30px;
            height: 30px; color: green;"></ha-icon>'; else return '<ha-icon
            icon="mdi:delete-alert" style="width: 30px; height: 30px; color:
            red"></ha-icon>' ]]]                       
        state:
          - value: Dans 7 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 6 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 5 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 4 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 3 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Dans 2 Jours
            operator: '=='
            color: yellow
            styles:
              state:
                - color: yellow
          - value: Demain
            operator: '=='
            color: orange
            icon: mdi:delete-restore
            styles:
              state:
                - color: orange
          - value: Aujourd'hui
            operator: '=='
            color: red
            icon: mdi:delete-restore
            styles:
              state:
                - color: red
        styles:
          icon:
            - margin-left: 32px
          name:
            - margin-left: 6px
            - justify-self: start
            - font-size: 15px
          state:
            - font-weight: bold
            - margin-left: 6px
            - justify-self: start
            - font-size: 12px
          custom_fields:
            date:
              - top: 73%
              - left: 43%
              - position: absolute
              - color: red
              - font-size: 12px
            statut:
              - top: 50%
              - left: 78%
              - position: absolute
              - color: red
              - font-size: 12px
        hold_action:
          action: call-service
          service: input_text.set_value
          service_data:
            entity_id: input_text.poubelle_jaune_monstres_statut
            value: Vider
        card_mod:
          style: |
            ha-card {
              margin-top: -8px;
            }

J’ai peut etre une idée, le ramassage est 1 fois par mois

voila j’ai corrigé pour le code pour le mois et les couleurs
garbage_13

Il me reste automatisme pour la remise a zéro du mois, c’est pas gagné

Pour l’automatisme j’ai modifié comme ceci, tu en pense quoi ?
surtout pour la partie Jaune reset à 31 jours (mais je sais pas comment ça va se passer pour les mois en 30 ou moins)

Résumé
alias: Poubelle Statut
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.poubelle_verte_jour
    to: Dans 7 Jours
    id: verte
  - platform: state
    entity_id:
      - sensor.poubelle_bleu_jour
    to: Dans 7 Jours
    id: bleu
  - platform: state
    entity_id:
      - sensor.poubelle_marron_jour
    to: Dans 7 Jours
    id: marron
  - platform: state
    entity_id:
      - sensor.poubelle_jaune_jour
    to: Dans 31 Jours
    id: jaune    
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: verte
        sequence:
          - service: input_text.set_value
            data:
              value: A vider
            target:
              entity_id: input_text.poubelle_verte_statut
      - conditions:
          - condition: trigger
            id: bleu
        sequence:
          - service: input_text.set_value
            data:
              value: A vider
            target:
              entity_id: input_text.poubelle_bleu_statut
      - conditions:
          - condition: trigger
            id: marron
        sequence:
          - service: input_text.set_value
            data:
              value: A vider
            target:
              entity_id: input_text.poubelle_marron_statut
      - conditions:
          - condition: trigger
            id: jaune
        sequence:
          - service: input_text.set_value
            data:
              value: A vider
            target:
              entity_id: input_text.poubelle_jaune_statut                          
mode: single

Ca l’air pas mal, mais comme tu dit pour la poubelle jaune ca va être plus compliquer (30j ou 31j et février).

L’icon rouge avec le ! il sert a quoi ?
c’est normal de l’avoir partout ?

L’icone de la poubelle avec le point d’exclamation en rouge, veut dire « pense a vider la poubelle ». Quand la poubelle est vider, tu fais un appuie longtemps (hold_action) sur la poubelle désirer et ca va passer en une icone poubelle sans exclamation en vert « pour dire que la poubelle est vider ».
poubelle button card4

J’ai fais sa, suite au message de @Plouf34 .

Ah ok, il me semblait avoir lu cela un peu plus haut.
Il n’y a pas moyen que le statut passe automatiquement en rouge la veille et le jour du ramassage et en vert les autres jour sans être obligé de faire un appui long ?

Actuellement, l’icone principal fas:dumpster change en mdi:delete-restore a partir de la veille en orange et le jours de rammasse en rouge.

la petit icone , c’est un plus pour savoir si la poubelle a été vider ou pas ( mais manuel ) et reset a chaque nouvelle date de ramassage.

Adapate a t’es besoin. Si tu le veut pas, tu retire la partie du code:

          statut: >
            [[[ if (states['input_text.poubelle_jaune_monstres_statut'].state ==
            "Vider") return '<ha-icon icon="mdi:delete" style="width: 30px;
            height: 30px; color: green;"></ha-icon>'; else return '<ha-icon
            icon="mdi:delete-alert" style="width: 30px; height: 30px; color:
            red"></ha-icon>' ]]]   

Bonjour,
Vous avez un moyen de gérer les jours fériés ?
Ex: de décalé d’un jour la collecte s’il y a un jour férié avant la collecte dans la semaine.