pippyn / Home-Assistant-Sensor-Afvalbeheer

Provides Home Assistant sensors for multiple Dutch and Belgium waste collectors
Apache License 2.0
280 stars 86 forks source link

Setup in latest release fails #503

Closed myTselection closed 3 weeks ago

myTselection commented 3 weeks ago

File "/config/custom_components/afvalbeheer/API.py", line 1365, in _format_id return waste_collector + "-" + postcode + "-" + str(house_number)


TypeError: can only concatenate str (not "int") to str
pippyn commented 3 weeks ago

What is your config? Including an address for me to test with

Gunthervc commented 3 weeks ago

After update!

Error during setup of component afvalbeheer Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 416, in _async_setup_component result = await task ^^^^^^^^^^ File "/config/custom_components/afvalbeheer/init.py", line 86, in async_setup data = get_wastedata_from_config(hass, conf) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/afvalbeheer/API.py", line 1318, in get_wastedata_from_config config["id"] = _format_id(waste_collector, postcode, street_number) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/afvalbeheer/API.py", line 1365, in _format_id return waste_collector + "-" + postcode + "-" + str(house_number)


TypeError: can only concatenate str (not "int") to str
```
afvalbeheer:
  wastecollector: RecycleApp
  resources:
    - restafval
    - gft
    - papier
    - pmd
    - glas
  postcode: *
  streetnumber: *
  streetname: *
  cityname: *
  suffix: a # (optional)
  # printwastetypes: 1 # print all types on HA startup
  upcomingsensor: 1 # (optional)
  dateformat: "%d %b" # (optional)
  # dateonly: 0 # (optional)
  dayofweek: 1 # Print weekday if within 7 days
  dayofweekonly: 1 # Delete date if within 7 days
  alwaysshowday: 0 # Always add weekday (outside of 7 days)
  # name: '' # For multiple sites
  # nameprefix: 1 # Change entity to include collector name
  builtinicons: 1
  builtiniconsnew: 1 # use better built in instead of provider based
  # disableicons: 0 # to use MDI icons
  dutch: 1 # (optional)
  updateinterval: 1
```
pippyn commented 3 weeks ago

Could you try release v5.3.9?

Jacob-nr5 commented 3 weeks ago

Still same error with V5.3.9

Gunthervc commented 3 weeks ago

5.3.9 solved it for me. Thanks

myTselection commented 3 weeks ago

5.3.9 fixed it for me too, thanks for the quick fix!