Would be easier if you posted the whole sensor yaml to see how you’ve done it, but I think you’ll need to use value_template: '{{ value | float }} instead of data_template:
Oh sorry! Yes, I was using value_template, this is why I should’ve posted it to avoid the mixup. Here’s the config:
- platform: scrape
resource: https://covidlive.com.au/vic/lga
name: Metro 14-Day Average
select: ".info.DAYS-AVERAGE-METRO-VIC .info-item.info-item-3.COUNT p"
value_template: '{{ value | float }}'
scan_interval: 1800
I should also mention that the numbers are currently being used for a gauge card on my frontend. The card has been interpreting the value as a number without any issues.
Please post your new config with the unit added. Also you may have to refresh your browser cache and wait 24 hours for the previous measurements to disappear (usually results in dual graphs for 24 hours / graphing period).
Hi, I will continue this thread cause I have a similar problem, and I’m going nuts.
1)
I get the forecasted temperature for tomorrow, this kind of works I can se the values on my dashboard.
2)
I then try to make an automation that has a condition if forecasttemp0 is below 10 then do the action
( now the action is only a number increment)
But the problem is that the - condition: numeric_state doe not work with my temperature value.
Ive tried to read these topics, tried to add a float and a int , tried to add unit of measurement. The automation UI somethings creat an extra value_template: “” line, but removing it does not help either.
Then What, I know it’s some stupid misstake I made, but I need help
Below is some info.
The Error code is: Executed: November 15, 2022 at 23:27:59 Result:
result: null
## conditions/0
Executed: November 15, 2022 at 23:27:59
Error: In ‘numeric_state’: In ‘numeric_state’ condition: entity sensor.forcasttemp0 state ‘’ cannot be processed as a number
## conditions/0/entity_id/0
Executed: November 15, 2022 at 23:27:59
Error: In ‘numeric_state’ condition: entity sensor.forcasttemp0 state ‘’ cannot be processed as a number