From 89795d5e8024733eee919c73a55c34ae2640986e Mon Sep 17 00:00:00 2001 From: niklasweber Date: Wed, 27 Oct 2021 21:09:39 +0200 Subject: [PATCH] Add publish_initial_value option to rotary_encoder (#1565) --- components/sensor/rotary_encoder.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/sensor/rotary_encoder.rst b/components/sensor/rotary_encoder.rst index 33ac447ed..772ef7fb7 100644 --- a/components/sensor/rotary_encoder.rst +++ b/components/sensor/rotary_encoder.rst @@ -59,6 +59,10 @@ Configuration variables: the knob further will not decrease the number. Defaults to no minimum. - **max_value** (*Optional*, int): The maximum value this rotary encoder will go to, turning the knob further will not increase the number. Defaults to no maximum. +- **publish_initial_value** (*Optional*, boolean): Controls whether the value is published + upon start of ESPHome. By default the value is only published when it changes, causing an + "unknown" value at first. If you set this option to true, the value is published once after + boot and when it changes. Defaults to ``false``. - **on_clockwise** (*Optional*, :ref:`Automation `): Actions to be performed when the knob is turned clockwise. See :ref:`sensor-rotary_encoder-triggers`. - **on_anticlockwise** (*Optional*, :ref:`Automation `): Actions to be performed when