Data template from string to float

hi All,
I am trying to read a rain value from a sensor defined like this:

  - platform: command_line
    name: rain_in_24
    command: "curl -s | grep 'inches since midnight' | cut -d',' -f 2 | cut -c2-4"
    scan_interval: 3600
    value_template: "{{ value | float }}"

currl command returns string ‘0.3’
$ curl -s APRS/CWOP weather report from FW6463 – Google Maps APRS | grep ‘inches since midnight’ | cut -d’,’ -f 2 | cut -c2-4


When I look at the entity history in lovelace I see it like this, which I am wondering whether it came in as string or as float

I was expecting to see it as a graph. Any feedback why is not like a graph but like a bar?

Screen Shot 2021-05-03 at 7.28.48 PM


Add a unit_of_measurement to get a graph. Doesn’t matter what the unit is, just that it has one.

unit_of_measurement string (optional)
Defines the unit of measurement of the sensor, if any.

hi Rob,
Well… I just did that but it still shows as a bar. I reloaded the customizations from the server controls and even restarted the HA
Screen Shot 2021-05-03 at 9.31.17 PM|399x235

from the customize.yaml

  unit_of_measurement: in