Counter increment step 0,5?

Hi

AFAIK it’s only possible to configure counter steps as an integer value…
Is it possible to make it a float instead somehow?
I need an automatisation that increments my counter with 0,5 each time something happens (GPIO/binary sensor goes from 0 to 1).
To explain why: I have a reed contact connected to a GPIO pin that pulses every time the watermeter consumes 0,5 liter. Therefor I need a counter increment + 0,5 every time my binary sensor goes from 0 to 1 (off to on).

Or is there another possible solution please?

Tnx

If you’re using an input_number you should be able to specify 0,5 increment steps (according to the documentation).

1 Like

Will try it out!

Any disadvantages over using Counter?
Is there a reason the Counter steps are only integer and not float?

That’s the way it was coded. :man_shrugging:

You can divide the counter by 2 in a template sensor to achieve the result you want.

1 Like

Ok, I used the input_number and it seems to do what I wanted. Just a suggestion to maybe enable “float” steps for counters too? Tnx for the quick reply and solution!

1 Like