Riemann sum device reports unknown

Hi guys,

I’m trying to create a couple of energy meter devices using the Riemann sum helpers. I’ve created a couple of simple template sensors like this:

- unique_id: "Utelamper effekt"
  device_class: power
  unit_of_measurement: W
  state: >
    {% if states('input_boolean.utelys_indikator') == "on" %}
    {{90}}
    {% else %}
    {{15}}
    {% endif %}

- unique_id: "Kjøleskap effekt"
  device_class: power
  unit_of_measurement: W
  state: 15

Then I’ve set up the Riemann sum devices in the UI. Here you can see the result.

With the “Utelamper”-one I’ve tried setting the state of the sensor device directly through the UI, and then the Riemann sum works. It seems like it cant interpret the number as a number?

Thanks!

It seems my problem was caused by the source sensor never updating, and thus never triggering an update of the Riemann-sensor. I’ll have to look in to a better solution for this tomorrow :slight_smile: