Min Renovasjon

Custom component give a error

Log Details (ERROR)
Fri Jan 17 2020 19:51:31 GMT+0100 (Central European Standard Time)
Error during setup of component min_renovasjon
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 170, in _async_setup_component
    hass, processed_config
  File "/config/custom_components/min_renovasjon/__init__.py", line 48, in async_setup
    min_renovasjon = MinRenovasjon(street_name, street_code, house_no, county_id, date_format)
  File "/config/custom_components/min_renovasjon/__init__.py", line 61, in __init__
    self._kalender_list = self._get_calendar_list()
  File "/config/custom_components/min_renovasjon/__init__.py", line 121, in _get_calendar_list
    kalender_list = self._parse_calendar_list(tommekalender, fraksjoner)
  File "/config/custom_components/min_renovasjon/__init__.py", line 140, in _parse_calendar_list
    for calender_entry in tommekalender_json:
TypeError: 'bool' object is not iterable

Remember to update to new county numbers, btw.

If you want a countdown, instead of dates in the sensors:

  {% for entry in value_json %}
    {% if entry.FraksjonId == 2 %}
      {{ (as_timestamp(entry.Tommedatoer[0]) - as_timestamp(now())) | timestamp_custom("%d")| int }}
    {% endif %}
  {% endfor %}

With new code it gets 401 errors, with old code it gets TypeError: ‘bool’ object is not iterable

Hi!
Trying hard to get this to work, I added the 3 files in ha under custom_components\min_renovasjon.
Then added this to my sensors.yaml

- platform: rest
  scan_interval: 1800
  name: Renovasjon Restavfall
  device_class: timestamp
  resource: https://norkartrenovasjon.azurewebsites.net/proxyserver.ashx?server=https://komteksky.norkart.no/komtek.renovasjonwebapi/api/tommekalender/?kommunenr=xxxx&gatenavn=veinavn&gatekode=xxxxxxxxx&husnr=xx
  headers:
    Content-Type: undefined
    Kommunenr: xxxx
    RenovasjonAppKey: xxxxx-xxxxx-xxxx-xxxxx
    value_template: '{{(as_timestamp(value_json[0].Tommedatoer[0]) + 32400) | timestamp_utc}}'

But i am getting “invalid date” as result.
Any tips will be highly appreciated!