Add hold_off_send_last to @time_active#844
Conversation
|
As a dyslexic, I would want to have an example for this kwarg, as, after reading the description thrice, I could not grasp its functionality. You may disregard my comment. |
|
Example: if
This is useful for noisy and unstable sensors that spam updates: decorator can ignore the intermediate churn while still processing the latest value once the hold-off period ends. |
|
So |
|
With There is no double send. |
|
So if my power voltage sensor trigger is |
|
With With |
|
Crap, you are right. I made up a bad example. |
|
@ALERTua, i corrected my comment above. If it's still unclear, I'm happy to walk through more examples. It seems I didn't phrase the comment in |
The existing
hold_offdrops all triggers during the hold-off window, which is useful for rate limiting but can lose the latest data.With
hold_off_send_lastenabled, it still suppresses intermediate triggers, but runs once after the hold-off expires using the most recent suppressed trigger data.