Antwort auf: Abfallkalender über ICS Datei

Forum Forum Schnelle Frage Abfallkalender über ICS Datei Antwort auf: Abfallkalender über ICS Datei

#1684
AvatarAgentP38
Teilnehmer

Hi ich bin hier auch ein kompletter Newbee…

ich bekomme meine Werte aus der ICS in die Entities…

 

aber mit der Kartendarstellung hapert es bei mir…

 

hier meine config.yaml

<code class="language-markup-templating">#Müllkalender#



waste_collection_schedule:
    sources:
    - name: ics
      args:
        url: "https://calendar.google.com/calendar/ical/bmqsbfkr8val2rab0scilj9aes%40group.calendar.google.com/private-34c6c6fd3d5f4492f41f815e8fbe9492/basic.ics"

sensor:
 
  - platform: waste_collection_schedule
    name: Restmuell_date
    value_template: '{{value.date.strftime("%d.%m.%Y")}}'
    types:
      - Restmüll
  - platform: waste_collection_schedule
    name: Restmuell_collection
    value_template: '{{value.daysTo}}'
    types:
      - Restmüll
      
  - platform: waste_collection_schedule
    name: Papier_Date
    value_template: '{{value.date.strftime("%d.%m.%Y")}}'
    types:
      - Altpapier
  - platform: waste_collection_schedule
    name: Papier_collection
    value_template: '{{value.daysTo}}'
    types:
      - Altpapier
      

  - platform: waste_collection_schedule
    name: plastik_date
    value_template: '{{value.date.strftime("%d.%m.%Y")}}'
    types:
      - Gelber Sack
  - platform: waste_collection_schedule
    name: plastik_collection
    value_template: '{{value.daysTo}}'
    types:
      - Gelber Sack
      
  - platform: waste_collection_schedule
    name: next_waste_collection_daysto
    details_format: upcoming
    value_template: '{{value.types|join(", ")}} in {{value.daysTo}} Tagen'
     
#button-card#
  - platform: waste_collection_schedule
    name: MyButtonCardSensor
    value_template: '{{value.types|join(", ")}}|{{value.daysTo}}|{{value.date.strftime("%d.%m.%Y")}}|{{value.date.strftime("%a")}}'
      

 

Und hier meine Einträge aus der Card…

 

<code class="language-markup-templating">type: entities
entities:
  - entity: sensor.restmuell_date
    icon: 'mdi:delete-empty'
    show_state: false
    type: 'custom:multiple-entity-row'
    name: Restmüll
    secondary_info: last-changed
    entities:
      - entity: sensor.restmuell_collection
        name: Abholung in
        unit: Tage(n)
      - entity: sensor.restmuell_date
        name: Datum
  - entity: sensor.plastik_date
    icon: 'mdi:recycle'
    show_state: false
    type: 'custom:multiple-entity-row'
    name: Gelbe Tonne
    secondary_info: last-changed
    entities:
      - entity: sensor.plastik_collection
        name: Abholung in
        unit: Tage(n)
      - entity: sensor.plastik_date
        name: Datum
  - entity: sensor.papier_date
    icon: 'mdi:tree'
    show_state: false
    type: 'custom:multiple-entity-row'
    name: Grüne Tonne
    secondary_info: last-changed
    entities:
      - entity: sensor.papier_collection
        name: Abholung in
        unit: Tage(n)
      - entity: sensor.papier_date
        name: Datum
  - entity: sensor.mybuttoncardsensor
    type: 'custom:button-card'
    layout: icon_name_state2nd
    show_label: true
    label: |
      [[[
       var days_to = entity.state.split("|")[1]
       if (days_to == 0)
       { return "Heute" }
       else if (days_to == 1)
       { return "Morgen" }
       else
       { return "in " + days_to + " Tagen" }
      ]]]
    show_name: true
    name: |
      [[[
        return entity.state.split("|")[0]
      ]]]
    state:
      - color: red
        operator: template
        value: '[[[ return entity.state.split("|")[1] == 0 ]]]'
      - color: orange
        operator: template
        value: '[[[ return entity.state.split("|")[1] == 1 ]]]'
      - value: default

 

kann mir bitte jemand dabei helfen…

 

Danke!“!!

Anhänge: