Bouni / abfallplus

AbfallPlus component for Home Assistant
MIT License
14 stars 1 forks source link

Error: Expected int for street #6

Closed dtoenies closed 2 years ago

dtoenies commented 2 years ago

Hi, I get the following error when entering my data: Invalid config for [sensor.abfallplus]: expected int for dictionary value @ data['street']. Got '2593bauernschaften'. (See /config/configuration.yaml, line 66). Please check the docs at https://github.com/Bouni/abfallplus

My configuration:

  - platform: abfallplus
    name: "Restmuell"
    key: e21758b9c711463552fb9c70ac7d4273
    municipality: 2593
    street: 2593bauernschaften
    trash_ids: "161, 53, 31, 169"

According to Payload it is the right street:

image

Version: 0.1.4

regards

Bouni commented 2 years ago

Please post the link to your municipalitys waste management website so that I can check what data the send to the API.

Bouni commented 2 years ago

Google lead me to assume that your waste management is https://www.egst.de/de/abfallabholung/

I just figured out its Altenberge, Aussenbereich, Bauernschaften, ?? which gave me this:

image

{
    "4c232c12bfcff69c46ab9b618ee064c4": "5f15a1bf658b84a4e8341a22751b8fa2",
    "f_id_kommune": "2593",
    "f_posts_json[]": [
        "a:4:{s:32:\"4c232c12bfcff69c46ab9b618ee064c4\";s:32:\"5f15a1bf658b84a4e8341a22751b8fa2\";s:12:\"f_id_kommune\";s:4:\"2593\";s:12:\"f_posts_json\";a:0:{}s:12:\"f_id_strasse\";s:1:\"0\";}",
        "a:4:{s:32:\"4c232c12bfcff69c46ab9b618ee064c4\";s:32:\"5f15a1bf658b84a4e8341a22751b8fa2\";s:12:\"f_id_kommune\";s:4:\"2593\";s:12:\"f_posts_json\";a:0:{}s:11:\"f_id_bezirk\";s:7:\"492,493\";}",
        "a:5:{s:32:\"4c232c12bfcff69c46ab9b618ee064c4\";s:32:\"5f15a1bf658b84a4e8341a22751b8fa2\";s:12:\"f_id_kommune\";s:4:\"2593\";s:12:\"f_posts_json\";a:1:{i:0;s:171:\"a:4:{s:32:\"4c232c12bfcff69c46ab9b618ee064c4\";s:32:\"5f15a1bf658b84a4e8341a22751b8fa2\";s:12:\"f_id_kommune\";s:4:\"2593\";s:12:\"f_posts_json\";a:0:{}s:12:\"f_id_strasse\";s:1:\"0\";}\";}s:11:\"f_id_bezirk\";s:7:\"492,493\";s:12:\"f_id_strasse\";s:18:\"2593bauernschaften\";}"
    ],
    "f_id_bezirk": "492,493",
    "f_id_strasse": "2593bauernschaften",
    "f_id_strasse_hnr": "496"
}

I've never had a layout like this with Hausnummer and a combination of id/name for f_id_strasse and a f_id_strasse_hnr. That need serious changes on the integartion to get that to work.

dtoenies commented 2 years ago

Sorry for my very late response.

Yes you googled it right. Is there any chance to get it work?

Bouni commented 2 years ago

@dtoenies I have to look into it but the AbfallPlus "API" is a fu***ing mess 🤯 I guess they prepare a new API under the hood because of these f_posts_json[] stuff that was not there when I started with this plugin.

Just be patient, I have too many side projects that need attention 😅

dtoenies commented 2 years ago

I did not want to rush you and can understand if it takes. Unfortunately, I also do not have time to familiarize myself ;)

Dielee commented 2 years ago

Hello guys! I had this problem too. Solved it by using f_id_strasse_hnr as street Setting. Works well!

Bouni commented 2 years ago

@Dielee 🥳 Nice find!

Dielee commented 2 years ago

But yes, the AbfallPlus is really a mess.... And thanks for this component! :)

Bouni commented 2 years ago

I extended the README with @Dielee finding and close this as its kind of resolved