Write input_number every X hours to influxDB

Hi,

iam using a input number to calculate some stuff in Grafana using InfluxDB as Source.

The Problem: The Inputnumbver just gets written once inside the influxDB (when its changed), so it jut works if the value was set in the given timeframe in grafana.

Is there any way to force Home Assistant to rewrite the SAME value es before into the InfluxDB? (eG Update input_number with the same value as before)

Hi,
Even if you managed to “rewrite” the same value, influxDB will not record it because this is the same value. This is influxDB thing to reduce writes/space usage.

It should update the timestamp instead. Maybe (!) i was able to manage it, will know tomorrow:

  - platform: template
    sensors:
      strompreis_influxdb:
        unit_of_measurement: "EUR/kWh"
        value_template: "{{ states('input_number.strompreis') }}"
        unique_id: strompreis_influxdb
        friendly_name: "Strompreis"
        attribute_templates:
          update_now: "{{ (now().minute / 50) | round(0) }}"

Edit: Works Fine :slight_smile: