The blueprint gets the trash collection dates for a given address from the MinRenovasjon API, used by several several providers in Norway (This was made with ROAF in mind). The API retrieves the next 2 dates for each trash type. The dates are then added to a local HA calendar and can be displayed on a dashboard as calendar or using TrashCard or similar.
Configuration
The Blueprint calls a Home Assistant rest_command
called roaf_hent
to retrieve data from the API ROAF uses. Add the following yaml code directly, or by including it, to/in your configuration.yaml
. Restart is required.
rest_command:
roaf_hent:
url: "{{ url }}"
method: GET
headers:
Renovasjonappkey: "{{ headers.Renovasjonappkey }}"
Kommunenr: "{{ headers.Kommunenr }}"
The blueprint passes the variables from the blueprint input.
You will also need a local calendar to point the blueprint to.
Required Input
Some information is required to make the API call. Open developer tools in your browser and go to the Network tab. Navigate to ROAF Hentekalender and enter the address you wish to get the garbage collection days for. In the Network tab you will find a bunch of requests to proxyserver...
click on the first of these.
In the request url
you will find the following
- kommunenr
- gatenavn
- gatekode
- husnr
In the header you will find
- renovasjonappkey
This information is needed as input for the blueprint to work.
Todo
Currently it only Displays restavfall, papir and matavfall. All other categories should be displayed as ‘Fraksjon x’. I will add support for all of ROAFs ‘Fraksjonsid’ soon so that they all are displayed with a readable name.