total_daily_energy: add restore option (#1656)

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
This commit is contained in:
Adrián Panella 2021-11-25 15:57:08 -06:00 committed by GitHub
parent e16e31733d
commit 22126d7493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,9 @@ Configuration variables:
to integrate over time.
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **restore** (*Optional*, boolean): Whether to store the intermediate result on the device so
that the value can be restored upon power cycle or reboot.
Defaults to ``true``.
- **min_save_interval** (*Optional*, :ref:`config-time`): The minimum time span between saving updated values to storage. This is to keep wearout of memory low. Defaults to ``0s``.
- **method** (*Optional*, string): The method to use for calculating the total daily energy. One of
``trapezoid``, ``left`` or ``right``. Defaults to ``right``.