bruxy70 / Garbage-Collection

🗑 Custom Home Assistant sensor for scheduling garbage collection (or other regularly re-occurring events - weekly on given days, semi-weekly or monthly)
MIT License
387 stars 90 forks source link

Confused | Pickup on every 2nd and 16th of the month #357

Closed leofabri closed 2 years ago

leofabri commented 2 years ago

Before you submit a new bug report, please check that

Write your question here

Hello, I'm trying to configure the following schedule:

Waste Collection Schedule
✅ Paper Weekly, every Wednesday
✅ Plastic Weekly, every Wednesday
✅ Organic Weekly, every Saturday and Wednesday
✅ Bio waste Weekly, every Saturday
✅ General Waste Weekly, every Saturday (from March 1 to November 30)
❓ Glass and Cans Monthly, on the 2nd, and 16th of each month

I managed to configure most of the entries (✅), but I'm struggling with the last one. I am not sure how to make the configuration based on a specific day number (or set of days) of the month.

Exceptions and Holidays:

I'll also have to add some exceptions. I haven't looked into these specific conditions so I haven't configured these yet, but I want to show them in case it's useful for development.

On January 1st | January 6th | Easter Monday | April 25th | May 1st | June 2nd | August 15th | November 1st | December 8th | December 25th | December 26th | Every Sunday:

bruxy70 commented 2 years ago

I do not have any configuration for a fixed date each month, regardless of the day of the week, I am afraid. I always thought that people use things like google calendar for these things, and the purpose was to create something that would be hard with a standard recurrent calendar, such as the first Wednesday each month.

Said that, I now made it possible to make whatever custom schedule using the automations. And I'll leave it up to you, if you prefer accepting that such configuraton does not exist, or if you want to do it with the manual update.

If the latter, then I made a blueprint for the autmation for you (as tehere might be few more like this). So here is what you do.

  1. Create a new Integration, for frequency choose blank.
  2. Import the blueprint: Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.
  3. Create an automation from the blueprint, select the garbage_collection entity with the blank frequency you created, and the two days
  4. Go back to the configuration of the garbage_collection device, and select the manual update

After a few seconds, it should

As for all the exceptions you have listed, I'd check on the blueprints for Public Holidays. There are different blueprints with different way of working. Check them out. If they do not work, you can create your own...or just leave it the way it is doing the offsets in your head :).

Cheers

leofabri commented 2 years ago

Thank you so much @bruxy70! The blueprint is working flawlessly. Yeah, when it comes to waste that there are so many use cases!

Using a custom blueprint is totally fine to me. Maybe, it might be nice to mention this on the wiki so that others can approach the integration fearlessly. As for the exceptions, I'll definitely check the other blueprints out. Doing the offsets myself and keeping track of all the exceptions is too hard for someone who struggles to remember his own phone number lol :)

Keep up the great work man!

bruxy70 commented 2 years ago

Great that it worked. Where in the wiki do you suggest mentioning that? I made a video about that BTW, so that might help. And I tried to to make the GitHub documentation and the Blueprints rather self-explanatory. Not much active on the wiki I am afraid.

leofabri commented 2 years ago

Sorry for not replying @bruxy70, I somehow did not see the notification. Anyways, you have done a great job! I saw the video, and my family is already enjoying how straightforward this is. I've noticed you added the blueprint to the readme... I think it's more than enough as it's also quite easy to implement. I doubt anyone would have a problem with it.