From 51a0866e1af40a1bc93840eec79e2946582a7b0c Mon Sep 17 00:00:00 2001 From: kahrendt Date: Wed, 25 Oct 2023 16:30:25 -0400 Subject: [PATCH] Document clamp filter's ignore out of range option (#3223) --- components/sensor/index.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/components/sensor/index.rst b/components/sensor/index.rst index 4fd9ba533..3010c0cde 100644 --- a/components/sensor/index.rst +++ b/components/sensor/index.rst @@ -262,12 +262,26 @@ degree with a least squares solver. ``clamp`` ********* -Limits the value to the range between ``min_value`` and ``max_value``. Sensor values outside these bounds will be set to ``min_value`` or ``max_value``, respectively. If ``min_value`` is not set, there is no lower bound, if ``max_value`` is not set there is no upper bound. +Limits the value to the range between ``min_value`` and ``max_value``. By default, sensor values outside these bounds will be set to ``min_value`` or ``max_value``, respectively. If ``ignore_out_of_range`` is true, then sensor values outside those bounds will be ignored. If ``min_value`` is not set, there is no lower bound; if ``max_value`` is not set there is no upper bound. Configuration variables: - **min_value** (*Optional*, float): The lower bound of the range. - **max_value** (*Optional*, float): The upper bound of the range. +- **ignore_out_of_range** (*Optional*, bool): If true, ignores all sensor values out of the range. Defaults to ``false``. + +.. code-block:: yaml + + # Example configuration entry + - platform: wifi_signal + # ... + filters: + - clamp: + min_value: 10 + max_value: 75 + ignore_out_of_range: true + + ``round`` *********