Trigger.payload shows the wrong value. Wrong payload format or encoding?

Hi, in my HA with evcc as addon, evcc sends a topic named evcc/site/gridEnergy to the HA internal mosquitto broker. I can see the correct values arriving in HA via HA addon MQTT explorer. And I can trigger an automation with it. So everything shoud be fine.
BUT: The received value is always interpreted as a giant integer, while evcc sends a payload e.g. 1234.56 what should be a string containing a float value.
The trace shows (for example):

params:
  domain: input_number
  service: set_value
  service_data:
    value: 27554000
    entity_id:
      - input_number.grid_evcc
  target:
    entity_id:
      - input_number.grid_evcc
running_script: false

The automation:

- id: '1723061322380'
  alias: grid evcc
  description: Zu-/Abfluss laut evcc (lokal über mqtt)
  trigger:
  - platform: mqtt
    topic: evcc/site/gridEnergy
    encoding: ''
  condition: []
  action:
  - service: input_number.set_value
    target:
      entity_id: input_number.grid_evcc
    data_template:
      value: '{{ trigger.payload_json }}'
  mode: single

I tried all documented variations on encoding: and .payload, with no success.
Please help, thanks, Frank

MQTT Explorer is a highly recommended free program to use to verify what data is being received by your mqtt broker:

I can’t say for certain what the issue is, but my first attempt would have been without the encoding: '' line (just remove it entirely) and the template would be {{ trigger.payload | float }}

Although if you’re just copying this into an input number, why don’t you just create an mqtt sensor instead and get rid of the input number and the automation?

I tried a lot before (including remove encoding: '' and trying {{ trigger.payload | float }} ), but all this makes no difference.
Now I tried your idea and created an mqtt sensor, it shows 2.757e+07, which I think is the same problem.
Here the proof by MQTT Explorer, that the above is wrong:

I’m confused; your image shows gridEnergy = 2.757e+07 which is what you got with your automation and what you got from your new sensor.

Are you mistaking gridPower with gridEnergy?

…thank you so much mekaneck! I cant believe I was so silly.

Please mark mekaneck’s post with the Solution tag because it was responsible for solving your problem.

By doing that, other users looking for answers to similar problems will be led to mekaneck’s post.