nielsfaber / scheduler-component

Custom component for HA that enables the creation of scheduler entities
GNU General Public License v3.0
622 stars 40 forks source link

Add a little randomness to time slots #284

Closed michaelsidenius closed 4 months ago

michaelsidenius commented 1 year ago

Would it be possible to indicate the time slots with a bit of random variation (within a limit), so the repetition was not always on the exact same time (for e.g. away-from home lighning)

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

basrieter commented 11 months ago

Me too. Only thing missing.

nielsfaber commented 11 months ago

This feature has been requested multiple times but I have always considered it out of scope. Maybe this can be reconsidered. Any suggestions on how this should look like in the card, and how it should work in the background? Having a clear idea on the functionality would be a good jump start to make it happen.

basrieter commented 11 months ago

The most simple implementation would be a check-box that enables a randomness for a schedule. The result would be that for each next scheduled action (regardless of how it was scheduled) a random value (15 minutes or so) added to the scheduled time.

So whether I use a scheme or any of the other options, that would not matter. If an entity has an action at time x it then has that action somewhere between x-15 and x+15. And this is recalculated each time. So it might be x-5 first and x+3 the next time.

Perhaps the randomness (the delta in time) could be a config value. So you can set a randomness of 15 minutes or 10, or.....

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

michaelsidenius commented 10 months ago

Could this be implemented with Jinja2 code in the YAML config? something like setting time with: + {{ range(-15,15) | random }} (I am not an Jinja2 expert, obviously)

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

basrieter commented 9 months ago

Any update?

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

basrieter commented 8 months ago

@nielsfaber is this still something you are considering?

greentux commented 8 months ago

Hi Niels (very long time not seen, but here again, fine), I would also vote for that to have a simple away-lights schedule. Another nifty random thing would be a condition aka "switch the light on with a chance of 50%". Should I open an issue?

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

hagen-p commented 6 months ago

I'd love this feature so my here is my upvote

bigFin commented 6 months ago

bump

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days