Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105997

Retroactive template calculation?

$
0
0

Is it possible to have the template sensors compute over historic data? If not, how do you clean up the starting data that the new sensors had before they started updating (assuming the source of the values).

image

template:
  - sensor:
      - name: "vent_outdoor_temp_diff"
        unit_of_measurement: "°F"
        state: >
          {% set owmtemp = states('sensor.openweathermap_temperature') | float %}
          {% set vent = states('sensor.vent_temp') | float %}

          {{ (vent - owmtemp) | round(5, default=0) }}
  - sensor:
      - name: "vent_intake_temp_diff"
        unit_of_measurement: "°F"
        state: >
          {% set intake = states('sensor.intake_temp') | float %}
          {% set vent = states('sensor.vent_temp') | float %}

          {{ (vent - intake) | round(5, default=0) }}

{ edit } - I really would rather see historic data, but worst case cleaning up that init data allows me to see current data as the graph will be scaled correctly to see the line variances.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 105997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>