Automation mit Abfallkalender

Dein Google-Müllkalender ist bereits öffentlich? Dann müsste der als ics zur Verfügung stehen. Ich rede nur von deinem Kalender und nicht von den Daten, die irgendwie importiert wurden.

das Format ist ical/webcal und das konnte ich bisher in meinen Google-Kalender einbinden…

Du musst DEINEN GOOGLE - Kalender öffentlich machen. Ich rede von nichts anderem. Dann gibt Google diesen als ics frei.

ok, werde das machen, wenn das neue Jahr anfängt und ich die neuen Daten übernommen habe. Für den Rest bis zum Jahresende lohnt das ja nicht mehr …

Zum Testen lohnt es sich schon, weil dann theoretisch auch im neuen Jahr die neuen Termine automatisch übernommen werden sollten.

habe mir die Seite unserer Müllabfuhr angeschaut. Man kann Termine importieren, es ist also kein öffentlicher Kalender, der automatisch immer weitergeführt wird. Geht vermutlich auch nicht, weil es ja von den Strassen und der Müllart abhängt. Da müssten die ja hunderte von Kalendern online stellen …meine aktuellen Termine im Google Kalender enden am 31.12.23 Wenn ich da jetzt zB die nächsten 30 Termine importiere, hätte ich den Rest vom Dezember doppelt.

Testen bzw. einrichten könntest du es trotzdem. Wenn du dann im Januar die neuen Termine importierst, sollten diese direkt übernommen werden.

Und zum Testen die doppelten Termine vom Dezember einmal händisch löschen ist keine Option

ja schon nur war das Anfang dieses Jahres schon ein Krampf, das alles korrekt zu importieren, das hat mir einen Kalender komplett zerschossen, da muß ich diesmal mal anders vorgehen (evtl. einen 2. Kalender)?

Ja ich verwende den Google Calender NUR für die Abfallwirtschaft
Sonst findet alles im Apple Kalender statt
Gutes gelingen
Helmut

Bloß keinen zweiten Kalender. Dann musst du jedes Jahr auch waste_collection_schedule anpassen.

Ein 2. Kalender würde durchaus Sinn machen, wenn er z.B. nur für den Müll verwendet wird.

Hat er ja bereits


Siehe 1. Post

Also ich bin wirklich kein HA Spezialist, aber wenn ich in einen eigen Google Kalender die
Termine eintrage und dann als .ics exportiere und unter www ablege ist das doch in Ordnung
Da muss ich nur einmal im Dezember wenn die neuen Termine veröffentlicht werden (bei uns in Papierform!)
den Kalender aktualiseren??

Gruß
Helmut

Klar ist das in Ordnung und ggf. würde ich es auch so machen. Aber @Cpt.Hardy suchte eine andere Lösung bzw. konnte damit nichts anfangen.

Ich nutze auch die ICS, die ich von den Seiten der Stadt lade. Scheint mir der einfachste Weg. Sieht so aus bei mir…

An pick-up Tagen “blinken” dann die entsprechende “Behälter” und oben wird das Icon grün und ein kleiner Müllwagen fährt hin und her. :wink: Aber nur bis 11 Uhr!

4 „Gefällt mir“

@RobertoCravallo
Hallo Robert,
würdest du den dazugehörigen Code teilen. Sieht sehr gut aus!! :heart_eyes: :star_struck:
Gruß
Helmut

3 „Gefällt mir“

Klar, gerne. Um die Sensoren musst Du Dich kümmern und MUSHROOM und CARD_MOD wird auch benötigt. Ferner möchte ich gerne ein Bild sehen, wenn Du es am laufen hast. Ich bin 67 und habe vor vielen, vielen Jahren mal mit CLIPPER (unter DOS) und DELPHI rumgemacht. Seit einem Jahr HA. Code ist sicher verbesserungswürdig!!!

type: horizontal-stack
cards:
  - type: custom:mushroom-template-card
    primary: >-
      Nächste Abholung: {{ states.sensor.abfallnaechster.attributes.values() |
      first | replace("Biotonne", "Bio") | replace("papiertonne", "Papier") |
      replace("Wertstofftonne", "Wertstoff") | replace("Restmuell", "Restmüll")
      }}
    secondary: >-
      {# No german date variables, so we make our own #}

      {% set wochentage = ["Montag", "Dienstag", "Mittwoch", "Donnerstag",
      "Freitag", "Samstag", "Sonntag"] %} 

      {# Don't actually need the months in this code #}

      {% set monate = ["Januar", "Februar", "März", "April", "Mai", "Juni",
      "Juli", "August", "September", "Oktober", "November", "Dezember"] %}


      {# Get the next pickup date #}

      {% set next_pickup = states.sensor.abfallnaechster.attributes | first |
      as_timestamp |timestamp_custom("%d.%m.%Y") %}

      {# Get the next pickup date, MINUS the day #}

      {% set next_pickup_date_str = states.sensor.abfallnaechster.attributes |
      first | as_timestamp |timestamp_custom(", der %d.%m.%y") %}

      {# Get todays date #}

      {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}

      {# Convert the dayname to an INT #}

      {% set next_wochentag = states.sensor.abfallnaechster.attributes | first |
      as_timestamp |timestamp_custom("%w")| int %}


      {# Is there a pickup today, then show todays date #}

      {% if next_pickup == todays_date %}
         Abholung heute!!
      {# No pickup today, so show next pickup date #}

      {% else %}
         {{ wochentage[ next_wochentag - 1 ] }}{{ next_pickup_date_str }} (Heute: {{ todays_date  }})
      {% endif %}
    icon: >-
      {% set next_pickup = states.sensor.abfallnaechster.attributes | first |
      as_timestamp |timestamp_custom("%d.%m.%Y") %}

      {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}


      {% if next_pickup == todays_date %}
        mdi:truck-fast
      {% else %}
        mdi:trash-can-outline
      {% endif %}
    layout: vertical
    badge_color: ''
    badge_icon: ''
    icon_color: >-
      {% set next_pickup = states.sensor.abfallnaechster.attributes | first |
      as_timestamp |timestamp_custom("%d.%m.%Y") %}

      {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}


      {% if next_pickup == todays_date %}
        green
      {% else %}
        #990000
      {% endif %}
    hold_action:
      action: none
    double_tap_action:
      action: none
    entity: sensor.abfallnaechster
    tap_action:
      action: none
    card_mod:
      style: |
        {% set next_pickup = states.sensor.abfallnaechster.attributes | first |
          as_timestamp |timestamp_custom("%d.%m.%Y") %}

        {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}

        {% if next_pickup == todays_date %}

          ha-card { 
            --ha-card-border-radius: 6px; 
            --ha-card-border-color: green;
            --ha-card-border-width: 1px; 
            --card-mod-icon-color: white;

            mushroom-shape-icon { 
              --shape-color: green !important;
              --shape-color-disabled: none !important;}
          }
           
           ha-state-icon {
           animation: 2s vroom infinite;
           }

          @keyframes vroom {
            49% { opacity: -150;}
            50% { transform: translate(22px); opacity: -100; }
            51% { transform: translate(-22px); opacity: -100; }
            52% { opacity: -150; }
          }

        {% else %}

          ha-card { 
            --ha-card-border-radius: 6px; 
            --ha-card-border-color: #990000;
            --ha-card-border-width: 1px; 
            --card-mod-icon-color: white;

            mushroom-shape-icon { 
              --shape-color: #990000 !important;
              --shape-color-disabled: none !important;}
          }                    
        {% endif %}

und dann noch die vier “Tonnen”…

type: horizontal-stack
cards:
  - type: custom:mushroom-template-card
    primary: BIO
    secondary: >-
      {% set next_pickup = states.sensor.abfallbiotonne.attributes | first |
      as_timestamp |timestamp_custom("%d.%m.%Y") %}

      {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}

      {% if next_pickup == todays_date %}
         - Heute -
      {% else %}
         {{ next_pickup }}
      {% endif %}
    icon: mdi:leaf
    layout: vertical
    badge_color: ''
    badge_icon: ''
    icon_color: green
    hold_action:
      action: none
    double_tap_action:
      action: none
    entity: binary_sensor.bewegung_kueche_occupancy
    tap_action:
      action: none
    card_mod:
      style: |
        {% set next_pickup = states.sensor.abfallbiotonne.attributes | first |
          as_timestamp |timestamp_custom("%d.%m.%Y") %}

        {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}

        {% if next_pickup == todays_date %}
          mushroom-shape-icon {
            animation: blink 2s linear infinite;
          }
          @keyframes blink {
            50% {opacity: 0;}
          }
        {% endif %}  
  - type: custom:mushroom-template-card
    primary: Papier
    secondary: >-
      {% set next_pickup = states.sensor.abfallpapiertonnenext.attributes |
      first | as_timestamp |timestamp_custom("%d.%m.%Y") %}

      {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}

      {% if next_pickup == todays_date %}
         - Heute -
      {% else %}
         {{ next_pickup }}
      {% endif %}
    icon: mdi:note
    layout: vertical
    badge_color: ''
    badge_icon: ''
    icon_color: blue
    hold_action:
      action: none
    double_tap_action:
      action: none
    entity: sensor.abfallpapiertonnenext
    tap_action:
      action: none
    card_mod:
      style: >
        {% set next_pickup = states.sensor.abfallpapiertonnenext.attributes |
        first |
          as_timestamp |timestamp_custom("%d.%m.%Y") %}

        {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}


        {% if next_pickup == todays_date %}
          mushroom-shape-icon {
            animation: blink 2s linear infinite;
          }
          @keyframes blink {
            50% {opacity: 0;}
          }
        {% endif %}   
  - type: custom:mushroom-template-card
    primary: Restmüll
    secondary: >-
      {% set next_pickup = states.sensor.abfallrestmuell.attributes | first |
      as_timestamp |timestamp_custom("%d.%m.%Y") %}

      {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}

      {% if next_pickup == todays_date %}
         - Heute -
      {% else %}
         {{ next_pickup }}
      {% endif %}
    icon: mdi:trash-can-outline
    layout: vertical
    badge_color: ''
    badge_icon: ''
    icon_color: grey
    hold_action:
      action: none
    double_tap_action:
      action: none
    entity: sensor.abfallrestmuellnext
    tap_action:
      action: none
    card_mod:
      style: |
        {% set next_pickup = states.sensor.abfallrestmuell.attributes | first |
          as_timestamp |timestamp_custom("%d.%m.%Y") %}

        {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}

        {% if next_pickup == todays_date %}
          mushroom-shape-icon {
            animation: blink 2s linear infinite;
          }
          @keyframes blink {
            50% {opacity: 0;}
          }
        {% endif %}     
  - type: custom:mushroom-template-card
    primary: Wertstoff
    secondary: >-
      {% set next_pickup = states.sensor.abfallgelbersack.attributes | first |
      as_timestamp |timestamp_custom("%d.%m.%Y") %}

      {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}

      {% if next_pickup == todays_date %}
         - Heute -
      {% else %}
         {{ next_pickup }}
      {% endif %}
    icon: mdi:recycle
    layout: vertical
    badge_color: ''
    badge_icon: ''
    icon_color: yellow
    hold_action:
      action: none
    double_tap_action:
      action: none
    entity: sensor.abfallgelbersacknext
    tap_action:
      action: none
    card_mod:
      style: |
        {% set next_pickup = states.sensor.abfallgelbersack.attributes | first |
          as_timestamp |timestamp_custom("%d.%m.%Y") %}

        {% set todays_date = now().timestamp() | timestamp_custom('%d.%m.%Y') %}

        {% if next_pickup == todays_date %}
          mushroom-shape-icon {
            animation: blink 2s linear infinite;
          }
          @keyframes blink {
            50% {opacity: 0;}
          }
        {% endif %}    

Viel Spaß damit, wenn Du “aufgeräumt” hast, lass es mich bitte wissen.

LG aus Mannheim

1 „Gefällt mir“

Herzlichen Dank für deine Infos.
Hoffe ich kann das noch vor weihnachten umsetzen? Aber du hörst von mir.
Ich war vorher fast 10 jähre bei FHEM und nun seit 1 Jahr bei HA.
PS: uns trennt nicht viel Ich bin 68 :rofl:
Schönen 3. Advent
Helmut

1 „Gefällt mir“

aktuell sieht meine Abfallkalenter-Automation so aus:
image
ist also nix anderes als eine Kachel, die die Termine aus dem Kalender holt.
das ganze geht im Wust des Dashboards etwas unter.
Für meine Sauna habe ich mir als Ausschalt-Erinnerung so ein quasi Pop-up bebastelt (ist eigentlich ein bedingt angezeigtes Bild)

image

würde sowas auch für die Mülltonne haben wollen.
dazu würde man einen Helfer benötigen, der alle 3 Müllarten abfragt und feststellt, ob man 6-0 Stunden vor dem Ereignis ist.
Geht sowas?