Files
hacs_waste_collection_schedule/doc/source/affaldonline_dk.md
danielklejnstrup f7f4703f1b Adding source: affaldonline_dk (#2148)
* Adding sources: assensforsyning_dk, middelfart_dk and silkeborgforsyning_dk

* Minor fix in middelfart_dk.md

* Add source: Affaldonline_dk

* refomratting

* Affaldonline_dk.md update and removal of not yet pulled individual sources.

* README.md and info.md update

* affaldonline_dk source updates

* affaldonline_dk reformatting üadd EXTRA_INFO default_params

---------

Co-authored-by: 5ila5 <5ila5@users.noreply.github.com>
2024-06-18 18:18:04 +02:00

2.8 KiB

Affaldonline

Support for schedules from Affaldonline, which serves several Danish municipalities.

The layout of the response page may differ. There seems to be a default, but I've stumpled upon at least a few uniques.

Configuration via configuration.yaml

waste_collection_schedule:
    sources:
        - name: affaldonline_dk
          args:
              municipality: "favrskov"
              values: "Nørregade|1||||8382|Hinnerup|6443|108156|0"

Configuration Variables

municipality
(String) (required)

An affaldonline defined string for the municipality. I.e. "aeroe" for "Ærø".

A duckduckgo search revealed many of them:

values
(String) (required)

A string that includes the street name, house number, postal code, city name, and some numbers that seems to be internal affaldonline references.

How to find the "values" string to use

Go to the Affaldonline site for your municipality:

Open the developer console in your browser.

Enter your address and select the house number in the dropdown menu.

In the Network tab in the browser console, select the latest URL ending in showInfo.php and look under Payload, where you should find the values variable ready for copy/paste.

Depending on your browser, it should also be possible to right-click the house number field, and select "Inspect" - this should give you the html for the field, and here you can select the value from your house number in the list.

Customizing Waste Types

Customizing waste types is a feature of the Waste Collection Schedule component and is very useful here, since the waste types in affaldonline are often long and not very consistent.

waste_collection_schedule:
    sources:
        - name: affaldonline_dk
          args:
              municipality: "favrskov"
              values: "Nørregade|1||||8382|Hinnerup|6443|108156|0"
          customize:
              - type: "Plast/mad- og drikkekartoner og glas/metal"
                alias: "Plast/glas/metal"