Calculate Value

Hello,

I use a water meter sensor which publish to a MQTT Broker on HomeAssistant. I want to scale the value from m3 to liter. Perhaps easy to do, but I am unsuccesfull. I have tried:

mqtt:
    sensor:
        - name: "Wasserzähler"
          state_topic: "Wasserzaehler/main/value"
          value_template: '{{ value * 1000 | int }}'
          unit_of_measurement: "Liter"
          icon: "mdi:water"

But that does not work. How to achieve this?

Here is the mqtt structure:

value is always a string, use value_json.

Thanks, that works for me.

Are there any beginners guide for HomeAssistant how to learn the syntax, available types, type cast and so on regarding json?