How to add MQTT payload to Counter?

Hello, I’m new to HA.
I want to see if a switch from Openhab to Home Assistant is easy and doable.
I have many sensors that communicate with my smart home via MQTT.
Now I’m struggling with my gas meter.
This sensor report every minute the difference of the gasmeter since the last report. So the payload is normally between 0.00 and 0.01.

I use an automation wich triggered by the payload of 0.01 from the sensor. this most of the time works fine.
But how I can add more as 0.01 sometimes the value is 0.03 or 0.02.
It is possible to add the value of the senors payload directly to the Helper entity?

description: Test des Gaszählers
trigger:
  - platform: mqtt
    topic: CountSensor/Gas_count/impuls
    payload: "0.01"
condition: []
action:
  - service: counter.increment
    data: {}
    target:
      entity_id: counter.gas_zaehler_h
mode: single 

Yesterday I tried this to change the counter step via automation.
I created a Template sensor to extract the payload, at this time I don´t have a point number like 0.01 but a whole number like 1 or 2. Unfortunately the same issuse.

I can not change the step in the automation via the sensor value. (sensor.gaszahler_imp)

Is that even possible?

Thanks André

description: ""
trigger:
  - platform: mqtt
    topic: CountSensor/Gas_count/impuls
condition: []
action:
  - service: counter.configure
    data: 
    step: {{(sensor.gaszahler_imp)}}
  - service: counter.increment
    data: {}
    target:
      entity_id: counter.gas_zahler_h