diff --git a/configuration.yaml b/configuration.yaml index 3f36de2..e382418 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -1,9 +1,8 @@ homeassistant: # Load packages packages: !include_dir_named integrations - - - + media_dirs: + media: /media # Configure a default setup of Home Assistant (frontend, api, etc) default_config: @@ -17,15 +16,52 @@ tts: #script: !include scripts.yaml # scene: !include scenes.yaml -# switch: -# - platform: mqtt -# name: “sonoff-1" -# command_topic: "cmnd/sonoff-1/POWER" -# state_topic: "tele/sonoff-1/STATE" -# availability_topic: "tele/sonoff-1/LWT" -# qos: 1 -# payload_on: "ON" -# payload_off: "OFF" -# payload_available: "Online" -# payload_not_available: "Offline" -# retain: false \ No newline at end of file +waste_collection_schedule: + sources: + - name: ics + args: + url: https://drolshagen.abfuhrtermine.info/dates/exportDates/44/Ics + # file: FILE + offset: 0 + method: GET + params: {} + # year_field: YEAR_FIELD + # split_at: ":" + customize: + - type: ics + +# sensor: +# # next collection +# - platform: waste_collection_schedule +# name: next_collection + +sensor: + - platform: waste_collection_schedule + name: restlichen_tonnen + details_format: upcoming + count: 4 + value_template: '{{value.types|join(" + ")}} in {{value.daysTo}} Tag(en)' + date_template: '{{value.date.strftime("%d.%m.%Y")}}' + types: + - 'Restlichen Tonnen' + + - platform: waste_collection_schedule + name: papier_tonne + details_format: upcoming + count: 4 + value_template: '{{value.types|join(" + ")}} in {{value.daysTo}} Tag(en)' + date_template: '{{value.date.strftime("%d.%m.%Y")}}' + types: + - 'Papiertonne' + + - platform: waste_collection_schedule + name: tonnenbutton + count: 4 + value_template: '{{value.types|join(", ")}}|{{value.daysTo}}|{{value.date.strftime("%d.%m.%Y")}}|{{value.date.strftime("%a")}}' + + + +logger: + default: info + logs: + waste_collection_schedule: debug \ No newline at end of file diff --git a/custom_components/waste_collection_schedule/__pycache__/__init__.cpython-39.pyc b/custom_components/waste_collection_schedule/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..e5b0a24 Binary files /dev/null and b/custom_components/waste_collection_schedule/__pycache__/__init__.cpython-39.pyc differ diff --git a/custom_components/waste_collection_schedule/__pycache__/calendar.cpython-39.pyc b/custom_components/waste_collection_schedule/__pycache__/calendar.cpython-39.pyc new file mode 100644 index 0000000..bf59abf Binary files /dev/null and b/custom_components/waste_collection_schedule/__pycache__/calendar.cpython-39.pyc differ diff --git a/custom_components/waste_collection_schedule/__pycache__/const.cpython-39.pyc b/custom_components/waste_collection_schedule/__pycache__/const.cpython-39.pyc new file mode 100644 index 0000000..14067a6 Binary files /dev/null and b/custom_components/waste_collection_schedule/__pycache__/const.cpython-39.pyc differ diff --git a/custom_components/waste_collection_schedule/__pycache__/sensor.cpython-39.pyc b/custom_components/waste_collection_schedule/__pycache__/sensor.cpython-39.pyc new file mode 100644 index 0000000..e532831 Binary files /dev/null and b/custom_components/waste_collection_schedule/__pycache__/sensor.cpython-39.pyc differ diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/__pycache__/__init__.cpython-39.pyc b/custom_components/waste_collection_schedule/waste_collection_schedule/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..dc05b5f Binary files /dev/null and b/custom_components/waste_collection_schedule/waste_collection_schedule/__pycache__/__init__.cpython-39.pyc differ diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/__pycache__/collection.cpython-39.pyc b/custom_components/waste_collection_schedule/waste_collection_schedule/__pycache__/collection.cpython-39.pyc new file mode 100644 index 0000000..a510a9c Binary files /dev/null and b/custom_components/waste_collection_schedule/waste_collection_schedule/__pycache__/collection.cpython-39.pyc differ diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/__pycache__/scraper.cpython-39.pyc b/custom_components/waste_collection_schedule/waste_collection_schedule/__pycache__/scraper.cpython-39.pyc new file mode 100644 index 0000000..1f1e865 Binary files /dev/null and b/custom_components/waste_collection_schedule/waste_collection_schedule/__pycache__/scraper.cpython-39.pyc differ diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/service/__pycache__/ICS.cpython-39.pyc b/custom_components/waste_collection_schedule/waste_collection_schedule/service/__pycache__/ICS.cpython-39.pyc new file mode 100644 index 0000000..3369866 Binary files /dev/null and b/custom_components/waste_collection_schedule/waste_collection_schedule/service/__pycache__/ICS.cpython-39.pyc differ diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/service/__pycache__/__init__.cpython-39.pyc b/custom_components/waste_collection_schedule/waste_collection_schedule/service/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000..bca812b Binary files /dev/null and b/custom_components/waste_collection_schedule/waste_collection_schedule/service/__pycache__/__init__.cpython-39.pyc differ diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/__pycache__/ics.cpython-39.pyc b/custom_components/waste_collection_schedule/waste_collection_schedule/source/__pycache__/ics.cpython-39.pyc new file mode 100644 index 0000000..3229a71 Binary files /dev/null and b/custom_components/waste_collection_schedule/waste_collection_schedule/source/__pycache__/ics.cpython-39.pyc differ diff --git a/integrations/waste_collection_schedule.yaml b/integrations/waste_collection_schedule.yaml new file mode 100644 index 0000000..76e4644 --- /dev/null +++ b/integrations/waste_collection_schedule.yaml @@ -0,0 +1,17 @@ +# waste_collection_schedule: +# sources: +# - name: ics +# args: +# url: https://drolshagen.abfuhrtermine.info/dates/exportDates/44/Ics +# # file: FILE +# offset: 0 +# method: GET +# params: {} +# # year_field: YEAR_FIELD +# split_at: ":" + + +# sensor: +# # next collection +# - platform: waste_collection_schedule +# name: next_collection \ No newline at end of file