Graph rounding number

I’m using a scrape to return a number from a site, which works well…

image

image

But the graph doesn’t want to move from 5.0

Is it defined as a float ?

I have this…

value_template: '{{ value.split("GBX")[1] }}'

try

value_template: '{{ value.split("GBX")[1] | float }}'

Plus add a

unit_of_measurement: '£'

for what ever currency you’re using or it will see it as a discrete value instead of continuous.

Defines the units of measurement of the sensor, if any. This will also influence the graphical presentation in the history visualization as a continuous value. Sensors with missing unit_of_measurement are showing as discrete values.

This just changed the result to zero.

I did this before, didn’t make a difference

The value has a comma in it. Remove the comma

1 Like

This is how the number is pulled back as it’s a currency.

Yes. But you need to remove it.

value_template: '{{ value.split("GBX")[1] | replace(",", "") | float }}'
2 Likes

Got it, thanks!

image