Hi,
a brief question by a home assistant newcomer.
I would like to create a sensor and regularly (say every 60s) update its value by incrementing it by some number which is to be calculated from some other sensor value.
And I would like this incremented sensor to keep/restore its value after a HA restart.
Thank you very much in advance!
Thanks a lot, with your hint and some trial and error I ended up with:
- trigger:
- platform: time_pattern
minutes: "/1"
sensor:
- name: "Energieintegral Summation"
unique_id: energieintegral_summation
state: >
{{ ( states('sensor.energieintegral_summation') | float + states('sensor.vl_uberschuss') | float) | round(1, default = 0) }}
unit_of_measurement: "Kmin"
What has unneccessarily has cost me some lifetime is that I unique_id seems to be obligatory here, otherwise the template throws errors to the log.