Merge branch 'current' into beta

This commit is contained in:
Jesse Hills 2024-07-13 09:45:38 +12:00
commit 9db75c3132
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
5 changed files with 13 additions and 15 deletions

View File

@ -7,7 +7,8 @@ Time Based Cover
The ``time_based`` cover platform allows you to create covers with position control that do not
have any position feedback. The state of the cover is thus always an assumed one, the current
position is approximated with the time the cover has been moving in a direction.
position is approximated with the time the cover has been moving in a direction. The state
of the cover can be restored at node reboot.
.. figure:: images/more-info-ui.png
:align: center
@ -71,12 +72,6 @@ Configuration variables:
The stop button on the UI is always enabled even when the cover is stopped and each press
on the button will cause the ``stop_action`` to be performed.
.. note::
The state of the cover can be restored from flash after a node reboot, with
``esp8266_restore_from_flash: true`` option set.
See :doc:`esp8266_restore_from_flash </components/esphome>` for details.
Handle stop_action:
------------------------
For some cover controllers, separate switches for UP and DOWN action are used while a stop is issued when sending a counter command.

View File

@ -40,7 +40,6 @@ Configuration variables:
``int`` (for integers), ``float`` (for decimal numbers), ``int[50]`` for an array of 50 integers, etc.
- **restore_value** (*Optional*, boolean): Whether to try to restore the state on boot up.
Be careful: on the ESP8266, you only have a total of 96 bytes available for this! Defaults to ``no``.
This will use storage in "RTC memory", so it won't survive a power-cycle unless you use the ``esp8266_restore_from_flash`` option to save to flash. See :doc:`esp8266_restore_from_flash </components/esphome>` for details.
- **max_restore_data_length** (*Optional*, integer): Only applies to variables of type ``std::string``. ESPHome will allocate enough space for this many characters,
plus single character of overhead. Strings longer than this will not be saved. The max value of this variable is 254 characters, and the default is 63 characters.
- **initial_value** (*Optional*, string): The value with which to initialize this variable if the state
@ -68,6 +67,14 @@ Configuration variables:
- **value** (**Required**, :ref:`templatable <config-templatable>`): The value to set the global
variable to.
.. note::
This action can also be written in lambdas:
.. code-block:: cpp
id(my_global_var) = 10;
See Also
--------

View File

@ -43,8 +43,6 @@ Configuration variables:
- **flash_transition_length** (*Optional*, :ref:`config-time`): The transition length to use when flash
is called. Defaults to ``0s``.
- **restore_mode** (*Optional*): Control how the light 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_OFF`` - Attempt to restore state and default to OFF if not possible to restore.
- ``RESTORE_DEFAULT_ON`` - Attempt to restore state and default to ON.

View File

@ -76,8 +76,6 @@ Configuration variables:
"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).

View File

@ -46,7 +46,7 @@ Adjust ``GPIO12`` to match your set up of course. The output from the pulse coun
.. note::
The ``pulse_meter`` sensor sends an update every time a pulse is detected. This can quickly lead to sub-second updates which can be a bit much for Home Assistant to handle. To avoid this, you can use the ``average_throttle`` filter to only send updates up to a desired interval:
The ``pulse_meter`` sensor sends an update every time a pulse is detected. This can quickly lead to sub-second updates which can be a bit much for Home Assistant to handle. To avoid this, you can use the ``throttle_average`` filter to only send updates up to a desired interval:
.. code-block:: yaml
@ -54,7 +54,7 @@ Adjust ``GPIO12`` to match your set up of course. The output from the pulse coun
- platform: pulse_meter
# ...
filters:
- average_throttle: 10s
- throttle_average: 10s
- filter_out: NaN
.. note::
@ -97,7 +97,7 @@ When the total sensor is configured, ``pulse_meter`` also reports the total numb
accuracy_decimals: 3
filters:
- multiply: 0.0001 # (1/10000 pulses per kWh)
# - average_throttle: 10s
# - throttle_average: 10s
# - filter_out: NaN
(Re)Setting the total energy value