@@ -3,9 +3,29 @@ description: ""
33headless : true
44---
55
6- Send the value periodically with the specified time interval.
7- If the sensor value changes during the interval the interval will not reset.
8- The last value of the sensor will be sent .
6+ Send the sensor value periodically at the specified time interval. If the sensor value changes
7+ during this interval, the timer will not reset — the last known value of the sensor will still
8+ be sent when the interval elapses .
99
10- So a value of ` 10s ` will cause the filter to output values every 10s regardless
11- of the input values.
10+ For example, a value of ` 10s ` will cause the filter to output the last known value every 10 seconds,
11+ regardless of how often the input value changes.
12+
13+ When using ` optimistic ` mode, the filter will still repeat the last known value at the configured interval,
14+ but in addition, every new incoming value is published immediately as it arrives. This ensures that the
15+ sensor output updates instantly on change, while maintaining a steady periodic "heartbeat" of the last value
16+ between updates. This mode is useful for sensors where immediate responsiveness is desired.
17+
18+ Configuration variables:
19+
20+ - ** period** (Required, time): The interval at which the last known value is republished.
21+ - ** optimistic** (* Optional* , boolean): When enabled, every new incoming value is published immediately as it
22+ arrives, regardless of the configured time interval.
23+
24+ ``` yaml
25+ # Example filters
26+ filters :
27+ - heartbeat : 5s
28+ - heartbeat :
29+ period : 5s
30+ optimistic : true
31+ ` ` `
0 commit comments