Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanprofs support #436

Open
koenza opened this issue Dec 28, 2023 · 8 comments
Open

Cleanprofs support #436

koenza opened this issue Dec 28, 2023 · 8 comments

Comments

@koenza
Copy link

koenza commented Dec 28, 2023

Would be great if you could add Cleanprofs support. It is an additional service that cleans your trash cans 12 times per year after the garbage truck has passed. Handy to know you should not retreive them from the street immediatly on that particular day.

https://www.cleanprofs.nl/reinigingsschema-ophaaldagen-v0/

@pippyn
Copy link
Owner

pippyn commented Jan 9, 2024

I'll look into it, but currently this sensor has no support for this additional info.
Do you have an address for me to test with?

@koenza
Copy link
Author

koenza commented Jan 18, 2024

You can access it with 5673BH housenumber 33. This address (not mine) has a subscription for both GFT and Rest.

@milamaja
Copy link

De JSON kan via een GET worden opgehaald:
https://cleanprofs.jmsdev.nl/api/get-plannings-address?zipcode=[POSTCODE]&house_number=[HUISNUMMER]&start_date=2024-08-27&end_date=2024-11-30&code=crm

De data die je krijgt ziet er vervolgens als volgt uit: (ingekort)

[
  {
    "product_name": "GFT",
    "weekday": "dinsdag",
    "date": "27 aug.",
    "full_date": "2024-08-27"
  },
  {
    "product_name": "RST",
    "weekday": "donderdag",
    "date": "29 aug.",
    "full_date": "2024-08-29"
  }
]

@pippyn
Copy link
Owner

pippyn commented Aug 27, 2024

Could you please test v5.3.8 of this sensor?
You can add your Cleanprofs configuration just as an extra waste collector

@milamaja
Copy link

Could you please test v5.3.8 of this sensor? You can add your Cleanprofs configuration just as an extra waste collector

Works perfectly in 5.3.9

To be able to see the difference in the calendar. I experimented a little.
I first tried different waste types. But ended up with changing the calendar.py

From row 70, the append function. Is:

 events.append(
                        CalendarEvent(
                            summary=waste_items.waste_type,
                            start=waste_items.date.date(),
                            end=waste_items.date.date() + timedelta(days=1),
                        )
                    )

I changed that to:

                  if self.WasteData.waste_collector == "cleanprofs":
                        calmessage = "Schoonmaken " + waste_items.waste_type + " container"
                    else:
                        calmessage = waste_items.waste_type
                    
                    events.append(
                        CalendarEvent(
                            summary=calmessage,
                            start=waste_items.date.date(),
                            end=waste_items.date.date() + timedelta(days=1),
                        )
                    )

@paulvt
Copy link

paulvt commented Aug 27, 2024

I have tested v5.3.9 and the sensors for Cleanprofs work for me! Thanks!

@Pleister023
Copy link

Pleister023 commented Oct 23, 2024

Edit: Never mind. Read the manual....solved it :-)

uhm....quick question, how would the config look like with two wastecollectors? I have this now, and it only shows the CleanProfs schedule, not the Meerlanden one:

afvalbeheer:
wastecollector: Meerlanden
resources:
- Restafval
- PMD
postcode: [mypostalcode]
streetnumber: [myhousenumber]
wastecollector: Cleanprofs
resources:
- GFT
postcode: [mypostalcode]
streetnumber: [myhousenumber]

Thanks!

@pippyn
Copy link
Owner

pippyn commented Oct 24, 2024

Like this:

afvalbeheer:
  - wastecollector: Meerlanden
    resources:
      - Restafval
      - PMD
    postcode: [mypostalcode]
    streetnumber: [myhousenumber]
  - wastecollector: Cleanprofs
    resources:
      - GFT
    postcode: [mypostalcode]
    streetnumber: [myhousenumber]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants