Abfallkalender
Was benötige ich?
Was benötige ich alles aus HACS?
Integration:
- Waste Collection Schedule
Frontends:
- Button-Card
- Banner Card
- Card-Mod
- Layout-Card
- Multiple Entity Row
iCal Datei
Kalenderdatei mit Müllterminen
Diese Datei findest meistens auf der Internetseite deines Mülldienstes. Falls du genau soviel Pech wie ich hast kannst du dir eine solche Datei relativ einfach auf https://ical.marudot.com/ selbst erstellen.
Zu speichern ist diese Datei im Homeassistant unter
/config/www/
Config Einträge:
Beachte hier die type:
diese müssen mit den Daten (Summary:) in deiner ICS übereinstimmen.
Configuration.yaml
waste_collection_schedule:
sources:
- name: ics
args:
file: "www/muell.ics"
customize:
- type: Restabfall
alias: Restabfall
icon: mdi:trash-can
- type: Papiertonne
alias: Papiertonne
icon: mdi:trash-can
- type: Bioabfall
alias: Bioabfall
icon: mdi:trash-can
- type: Plastikabfall
alias: Plastikabfall
icon: mdi:trash-can
fetch_time: "04:00"
day_switch_time: "10:00"
Sensor.yaml einbinden (falls noch nicht erledigt)
Hiermit kannst du eine Sensor.yaml einbinden
sensor: !include sensor.yaml
sensor.yaml
########################## Müllabfuhr ###########################
- platform: waste_collection_schedule
name: Papierabfall_date
value_template: '{{value.date.strftime("%d.%m.%Y")}}'
types:
- Papiertonne
- platform: waste_collection_schedule
name: Papierabfall_collection
value_template: "{{value.daysTo}}"
types:
- Papiertonne
- platform: waste_collection_schedule
name: Restmuelltonne_date
value_template: '{{value.date.strftime("%d.%m.%Y")}}'
types:
- Restabfall
- platform: waste_collection_schedule
name: Restmuelltonne_collection
value_template: "{{value.daysTo}}"
types:
- Restabfall
- platform: waste_collection_schedule
name: Plastiktonne_date
value_template: '{{value.date.strftime("%d.%m.%Y")}}'
types:
- Plastikabfall
- platform: waste_collection_schedule
name: Plastikmuelltonne_collection
value_template: "{{value.daysTo}}"
types:
- Plastikabfall
- platform: waste_collection_schedule
name: Biotonne_date
value_template: '{{value.date.strftime("%d.%m.%Y")}}'
types:
- Bioabfall
- platform: waste_collection_schedule
name: Biotonne_collection
value_template: "{{value.daysTo}}"
types:
- Bioabfall
- 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")}}'
Dashboard Card
type: entities
entities:
- entity: sensor.restmuelltonne_date
style: |
:host {
color: grey;
}
icon: mdi:delete-empty
show_state: false
type: custom:multiple-entity-row
name: Restmüll
secondary_info: false
entities:
- entity: sensor.restmuelltonne_collection
name: Abholung in
unit: Tage(n)
- entity: sensor.restmuelltonne_date
name: Datum
- entity: sensor.biotonne_date
style: |
:host {
color: brown;
}
icon: mdi:bio
show_state: false
type: custom:multiple-entity-row
name: Bio Müll
secondary_info: false
entities:
- entity: sensor.biotonne_collection
name: Abholung in
unit: Tage(n)
- entity: sensor.biotonne_date
name: Datum
- entity: sensor.papierabfall_date
style: |
:host {
color: turquoise
}
icon: mdi:tree
show_state: false
type: custom:multiple-entity-row
name: Papiertonne
secondary_info: false
entities:
- entity: sensor.papierabfall_collection
name: Abholung in
unit: Tage(n)
- entity: sensor.papierabfall_date
name: Datum
- entity: sensor.plastiktonne_date
style: |
:host {
color: yellow
}
icon: mdi:recycle
show_state: false
type: custom:multiple-entity-row
name: Plastik Sack
secondary_info: false
entities:
- entity: sensor.plastikmuelltonne_collection
name: Abholung in
unit: Tage(n)
- entity: sensor.plastiktonne_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
show_header_toggle: true
Automation
Hier meine Automation die mich per Push erinnert und zusätzlich per Alexa wenn wir zuhause sind.
Benachrichtigung um 21 Uhr am Vortag für Bio
alias: Benachrichtigung Müll Bio morgen
description: ""
trigger:
- platform: time
at: "21:01:00"
condition:
- condition: state
entity_id: sensor.biotonne_collection
state: "1"
action:
- service: notify.all_devices
data:
message: Biotonne raus stellen
title: Müllabfuhr
- if:
- condition: state
entity_id: group.presence_home
state: home
then:
- service: notify.alexa_media
data:
target:
- media_player.buro
- media_player.kuche
- media_player.wohnzimmer
- media_player.badezimmer
- media_player.schlafzimmer
data:
type: announce
message: Biotonne raus stellen!
mode: single
Benachrichtigung um 7 Uhr am Tag der Abholung für Bio
alias: Benachrichtigung Müll Biotonne
description: ""
trigger:
- platform: time
at: "07:00:00"
condition:
- condition: state
entity_id: sensor.biotonne_collection
state: "0"
action:
- service: notify.all_devices
data:
message: Biotonne raus stellen
title: Müllabfuhr
- if:
- condition: state
entity_id: group.presence_home
state: home
then:
- service: notify.alexa_media
data:
target:
- media_player.buro
- media_player.kuche
- media_player.wohnzimmer
- media_player.badezimmer
- media_player.schlafzimmer
data:
type: announce
message: Biotonne raus stellen!
mode: single
Benachrichtigung um 21 Uhr am Vortag für Restmüll
alias: Benachrichtigung Müll Rest morgen
description: ""
trigger:
- platform: time
at: "21:00:00"
condition:
- condition: state
entity_id: sensor.restmuelltonne_collection
state: "1"
action:
- service: notify.all_devices
data:
message: Restmüll raus stellen
title: Müllabfuhr
- if:
- condition: state
entity_id: group.presence_home
state: home
then:
- service: notify.alexa_media
data:
target:
- media_player.buro
- media_player.kuche
- media_player.wohnzimmer
- media_player.badezimmer
- media_player.schlafzimmer
data:
type: announce
message: Restmüll raus stellen!
mode: single
Benachrichtigung um 7 Uhr am Tag der Abholung für Restmüll
alias: Benachrichtigung Müll Restmüll
description: ""
trigger:
- platform: time
at: "07:00:00"
condition:
- condition: state
entity_id: sensor.restmuelltonne_collection
state: "0"
action:
- service: notify.all_devices
data:
message: Restmüll raus stellen
title: Müllabfuhr
- if:
- condition: state
entity_id: group.presence_home
state: home
then:
- service: notify.alexa_media
data:
target:
- media_player.buro
- media_player.kuche
- media_player.wohnzimmer
- media_player.badezimmer
- media_player.schlafzimmer
data:
type: announce
message: Restmüll raus stellen!
mode: single
Benachrichtigung um 21 Uhr am Vortag für Papier
alias: Benachrichtigung Müll Papier morgen
description: ""
trigger:
- platform: time
at: "21:00:00"
condition:
- condition: state
entity_id: sensor.papierabfall_collection
state: "1"
action:
- service: notify.all_devices
data:
message: Papiertonne raus stellen
title: Müllabfuhr
- if:
- condition: state
entity_id: group.presence_home
state: home
then:
- service: notify.alexa_media
data:
target:
- media_player.buro
- media_player.kuche
- media_player.wohnzimmer
- media_player.badezimmer
- media_player.schlafzimmer
data:
type: announce
message: Papiertonne raus stellen!
mode: single
Benachrichtigung um 7 Uhr am Tag der Abholung für Papier
alias: Benachrichtigung Müll Papier
description: ""
trigger:
- platform: time
at: "07:00:00"
condition:
- condition: state
entity_id: sensor.papierabfall_collection
state: "0"
action:
- service: notify.all_devices
data:
message: Papiertonne raus stellen
title: Müllabfuhr
- if:
- condition: state
entity_id: group.presence_home
state: home
then:
- service: notify.alexa_media
data:
target:
- media_player.buro
- media_player.kuche
- media_player.wohnzimmer
- media_player.badezimmer
- media_player.schlafzimmer
data:
type: announce
message: Papiertonne raus stellen!
mode: single
Benachrichtigung um 21 Uhr am Vortag für Plastik
alias: Benachrichtigung Müll Plastik morgen
description: ""
trigger:
- platform: time
at: "21:00:00"
condition:
- condition: state
entity_id: sensor.plastikmuelltonne_collection
state: "1"
action:
- service: notify.all_devices
data:
message: Plastik raus stellen
title: Müllabfuhr
- if:
- condition: state
entity_id: group.presence_home
state: home
then:
- service: notify.alexa_media
data:
target:
- media_player.buro
- media_player.kuche
- media_player.wohnzimmer
- media_player.badezimmer
- media_player.schlafzimmer
data:
type: announce
message: Plastik raus stellen!
mode: single
Benachrichtigung um 7 Uhr am Tag der Abholung für Plastik
alias: Benachrichtigung Müll Plastik
description: ""
trigger:
- platform: time
at: "07:00:00"
condition:
- condition: state
entity_id: sensor.plastikmuelltonne_collection
state: "0"
action:
- service: notify.all_devices
data:
message: Plastik raus stellen
title: Müllabfuhr
- if:
- condition: state
entity_id: group.presence_home
state: home
then:
- service: notify.alexa_media
data:
target:
- media_player.buro
- media_player.kuche
- media_player.wohnzimmer
- media_player.badezimmer
- media_player.schlafzimmer
data:
type: announce
message: Plastik raus stellen!
mode: single
No Comments