Json values to gauge

Hello i’m pretty new to using hassio.
I need help to split json data (from arduino). I can read the data itself, but I cannot get it into separate parts. The gauge always gives me; Entity is non-numeric : sensor.my_…_sensor or value is 0.
Can someone help me with this please?


  - platform: serial
    serial_port: /dev/ttyUSB0
    baudrate: 115200
  - platform: template
        friendly_name: Ph
        unit_of_measurement: ""
        value_template: "{{ states('sensor.serial_sensor').split(',')[1] | float }}"
        friendly_name: Tds
        unit_of_measurement: "ppm"
        value_template: "{{ states('sensor.serial_sensor').split(',')[2] | float }}"
        friendly_name: Temperature
        unit_of_measurement: "°C"
        value_template: "{{ states('sensor.serial_sensor').split(',')[3] | float }}"
        friendly_name: Flow
        unit_of_measurement: "l/h"
        value_template: "{{ states('sensor.serial_sensor').split(',')[4] | float }}"

Developer tools data:



Copy and paste your value_templates in Dev Tools/Templates and you will see what you get.
If you want an examle, you should post text (properly formatted) because no one whants to type the values from your pictures.

Thanks for the tip, I modified the forum.

Better! :slightly_smiling_face:
Here’s how you can play with json in the templates tool.

So the first value_template should be:

value_template: "{{ states('sensor.serial_sensor').Ph | float }}"


value_template: "{{ states('sensor.serial_sensor')['Ph'] | float }}"

thank you!, i found the problem
it works
this was the solution

The PH is {{ states('sensor.serial_sensor').split(',')[0].split(':')[1] | float }}