From ef431c0627fa6b3d2d408e7a29aee67a81a46a75 Mon Sep 17 00:00:00 2001 From: Brenan Kelley Date: Wed, 20 Mar 2024 02:32:50 -0700 Subject: [PATCH] Add statistics keep_last_sample option (#26348) * introduce preserve last value option * rename preserve_last_val to keep_last_sample --- source/_integrations/statistics.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/_integrations/statistics.markdown b/source/_integrations/statistics.markdown index b1de8075ae0..1de46f9a041 100644 --- a/source/_integrations/statistics.markdown +++ b/source/_integrations/statistics.markdown @@ -140,6 +140,11 @@ max_age: description: Maximum age of source sensor measurements stored. Setting this to a time period will cause older values to be discarded. If omitted, the number of considered source sensor measurements is limited by `sampling_size` only. Set both parameters appropriately to create suited limits for your use case. The sensor value will become `unknown` if the source sensor is not updated within the time period. A statistics sensor requires `sampling_size`, `max_age`, or both to be defined. required: false type: time +keep_last_sample: + description: Defines whether the most recent sampled value should be preserved regardless of the `max_age` setting. + required: false + default: false + type: boolean percentile: description: Only relevant in combination with the `percentile` characteristic. Must be a value between 1 and 99. The value defines the percentile value to consider. The 25th percentile is also known as the first quartile, the 50th percentile as the median. required: false