From e0f5d865825b2e9a11ba2cf64ae6848664a24807 Mon Sep 17 00:00:00 2001 From: nsimb <34156112+nsimb@users.noreply.github.com> Date: Sat, 3 Mar 2018 11:46:49 +0100 Subject: [PATCH] Added replace from , to . for float handling Since the website saves numbers with , the sensor ends up with "," when trying to use it in automations float does not work. So i thought i added this if somone ells uses the example --- source/_components/sensor.scrape.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/sensor.scrape.markdown b/source/_components/sensor.scrape.markdown index 06d1cd80424..cbbaf5553e0 100644 --- a/source/_components/sensor.scrape.markdown +++ b/source/_components/sensor.scrape.markdown @@ -126,7 +126,7 @@ sensor: resource: https://elen.nu/timpriser-pa-el-for-elomrade-se3-stockholm/ name: Electricity price select: ".elspot-content" - value_template: '{{ value.split(" ")[0] }}' + value_template: '{{ ((value.split(" ")[0]) | replace (",", ".")) }}' unit_of_measurement: "öre/kWh" ``` {% endraw %}