Add restore_mode to rotary_encoder sensor (#1584)

This commit is contained in:
niklasweber 2021-11-02 19:32:30 +01:00 committed by GitHub
parent 32264bb953
commit 6a3c4ef63f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,13 @@ Configuration variables:
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``.
- **restore_mode** (*Optional*): Control how the Rotary Encoder attempts to restore state on bootup.
For restoring on ESP8266s, also see ``esp8266_restore_from_flash`` in the
:doc:`esphome section </components/esphome>`.
- ``RESTORE_DEFAULT_ZERO`` (Default) - Attempt to restore state and default to zero (0) if not possible to restore.
- ``ALWAYS_ZERO`` - Always initialize the counter with value zero (0).
- **on_clockwise** (*Optional*, :ref:`Automation <automation>`): Actions to be performed when
the knob is turned clockwise. See :ref:`sensor-rotary_encoder-triggers`.
- **on_anticlockwise** (*Optional*, :ref:`Automation <automation>`): Actions to be performed when