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
382 stars 90 forks source link

collect_garbage only works on collection day #400

Closed pdx0 closed 2 years ago

pdx0 commented 2 years ago

Before you submit a new bug report, please check that

Is your feature request related to a problem? Please describe.

I use the integration to track when i need to put the bins out. When they have been put out i no longer care about this collection day so run collect_garbage

Sometimes i put my bins out the night before but collect_garbage doesn't seem to do anything unless it is collection day

Describe the solution you'd like

It would be nice if collect_garbage worked on days prior to collection

Describe alternatives you've considered

I could probably track this separately with a helper

Additional context

No response

bruxy70 commented 2 years ago

Yes, this is how it works. If you only want to track the day you need to take the trash out, why don't you offset in by -1 day and track the "day before"?

pdx0 commented 2 years ago

That makes sense. Is there a way to have Expire After set to the day after collection

bruxy70 commented 2 years ago

No, it is time, not date. It works with a date. The goal is to keep it simple. I used to implement all kind of features in the past, and it broke eventually. You might also set it for manual update and remove the date, so it will go for the next one. But that won't be easy as the manual update is designed to run during the entity update. So you'd have to keep it somewhere and force the update (basically building the complexity in your automation, not in the integration).