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?
configuration:
sensor:
- platform: serial
serial_port: /dev/ttyUSB0
baudrate: 115200
- platform: template
sensors:
my_ph_sensor:
friendly_name: Ph
unit_of_measurement: ""
value_template: "{{ states('sensor.serial_sensor').split(',')[1] | float }}"
my_tds_sensor:
friendly_name: Tds
unit_of_measurement: "ppm"
value_template: "{{ states('sensor.serial_sensor').split(',')[2] | float }}"
my_temperature_sensor:
friendly_name: Temperature
unit_of_measurement: "°C"
value_template: "{{ states('sensor.serial_sensor').split(',')[3] | float }}"
my_flow_sensor:
friendly_name: Flow
unit_of_measurement: "l/h"
value_template: "{{ states('sensor.serial_sensor').split(',')[4] | float }}"
Developer tools data:
{"Ph":16.2,"Tds":143,"Temp":25,"Flow":0,"Dobber1":false}