Hi dear,
For be fast and clear, i use feedparser for have rss flux, i receive value in “summary” entries who is; “precipitation (24h): 15,5mm” and i want to just keep the numeric value please.
Someone has an idea? =D
Hi dear,
For be fast and clear, i use feedparser for have rss flux, i receive value in “summary” entries who is; “precipitation (24h): 15,5mm” and i want to just keep the numeric value please.
Someone has an idea? =D
For help to everyone want to know my last solution…
for example
Result of entries in variable “sensor.precipitation” = [{‘summary’: ‘Précipitation (24h) : 15mm’}]
Now;
Make a new entry (template) yourself and use JSON command for modificate the result of the first variable (sensor.precipitation) by nothing like this;
{{ state_attr(‘sensor.precipitation’,‘entries’) |string|regex_replace(find=“[{‘summary’: ‘Précipitation (24h) : ", replace=’', ignorecase=False) |string|regex_replace(find=”‘}]", replace=’', ignorecase=False) }}
It replace the result of the sensor by new result in new sensor
So new result is: 15mm
Look like easy but i’m pretty sure that it exist other solution ^^
cheers