TCP Sensor negative value

Hey,

I have a TCP sensor connection (the server is an arduino wifi server). I would like get the temperature. It is working good with positive number (float), but when I send negative float (e.g. -20) then I get always zero. Arduino is sending only the number (e.g: 23 or -15)

  - platform: tcp
    name: "Temperature"
    host: 192.168.34.10
    port: 5555
    payload: "sensor_outdoor_temp"
    timeout: 10
    value_template: "{{ value | float }}"
    unit_of_measurement: "°C"

Why it is not working with the negative number?

Okay, my fault with float conversion in arduino code.

Solution: I convert float to string on arduino and convert string to float in home assistant. It’s okay now.