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

Delay One Day if no Garbage collection #362

Closed HVPereira closed 2 years ago

HVPereira commented 2 years ago

Before you submit a new bug report, please check that

Write your question here

Hello everyone,

Sorry if this looks like a dummy question but I am still trying to wrap my head around this. I use garbage collection for tracking the filters replacement in my aquarium and the plan fertilization as shown below:

image

The point here is I'm using verbose and would like to send some actionable notification where HASS will query the user to see if the replacement of the filter or the fertilization was performed. If not I wanted to delay one day... I've checked the documentation but I don't know how can I achieve this (or if it is even possible) did someone had a similar case? Also I'm using verbose so my comparison in the automation should consider the state 'Tomorrow' and 'Today' correct?

Hope someone can help me and sorry if this is already available somewhere here.

Best Regards, HP

bruxy70 commented 2 years ago

That would be a bit complicated and would get quite complex. I'd look at using the timers for that.

HVPereira commented 2 years ago

But is there a possibility to offset one day only in the variable? or there is only the possibility to offset the entire collection?

bruxy70 commented 2 years ago

You can offset one collection date, but these services are meant to work in device update automation. I mean, they would probably at any time, but it is a one-time change, the entity does not that you made a change. So on the next update (on midnight or restart) it would re-calculate the schedule and set it back. This is why this is done in the script called by the update, so that the changes are always re-applied. So that if you wanted to do it, you'd have to do it and remember it somewhere, and then have a manual update script that would check it and re-apply it. Hence I started my reply by "that would be complicated". Not impossible, but not worth the trouble IMHO.