How to set a counter-helper state via Dashboard

I use a counter helper for the Gas Consumption, which is incremented via an automation, triggered by an aquaria Door sensor at the gasmeter .

Unfortunately this does not work exact, some triggers are not recorded, so I have to “calibrate” the counter by hand from time to time to the correct value.

I can do this in the Developer Tools, but I want to do it visa a Dashboad.
How can I do this,

Just to make sure there is not a translation misunderstanding, which of these helper integrations are you actually using:

Or

I use a counter

Create an input number to hold your calibration value. Name it “Calibration Value”.

Then create a script to calibrate the counter using the counter.set_value service.

Set the value to your input number with a template in the script:

script:
  calibrate_energy:
    sequence:
      - service: counter.set_value
        target:
          entity_id: counter.your_energy_counter
        data:
          value: "{{ states('input_number.calibration_value') }}"

Create an entities card with your input number and a button to call the script as the tap action.

Fill out the value in the card. Press the button.

1 Like

Tbanks, Perfect!

1 Like