From e01079d2bebbf5b5f7521d130ae98307d86fd7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Sun, 19 Mar 2023 20:50:21 +0100 Subject: [PATCH] Documentation for the `skip_initial` filter (#2760) --- components/sensor/index.rst | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/components/sensor/index.rst b/components/sensor/index.rst index 0127d108c..3cd85b275 100644 --- a/components/sensor/index.rst +++ b/components/sensor/index.rst @@ -406,6 +406,21 @@ Configuration variables: published. With this parameter you can specify when the very first value is to be sent. Defaults to ``1``. +``skip_initial`` +**************** + +A simple skip filter; `skip_initial: N` skips the first `N` sensor readings and passes on the +rest. This can be used when the sensor needs a few readings to 'warm up'. After the initial +readings have been skipped, this filter does nothing. + +.. code-block:: yaml + + # Example configuration entry + - platform: wifi_signal + # ... + filters: + - skip_initial: 3 + ``throttle`` ************ @@ -650,7 +665,7 @@ From :ref:`lambdas `, you can call several methods on all sensors advanced stuff (see the full API Reference for more info). - ``publish_state()``: Manually cause the sensor to push out a value. It will then - be processed by the sensor filters, and once filtered will propagate though ESPHome and though the API to Home Assistant or out via MQTT if configured. + be processed by the sensor filters, and once filtered will propagate though ESPHome and though the API to Home Assistant or out via MQTT if configured. .. code-block:: cpp