From e950d8787f6d8e3f8e56e4fd69c6557ba4321936 Mon Sep 17 00:00:00 2001 From: Sven ten Raa Date: Sun, 6 Nov 2022 14:29:10 +0100 Subject: [PATCH] Fix issues arising from E notation pricing by explicitly casting to float --- custom_components/entsoe/coordinator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/entsoe/coordinator.py b/custom_components/entsoe/coordinator.py index 1e505de..dbd90a4 100644 --- a/custom_components/entsoe/coordinator.py +++ b/custom_components/entsoe/coordinator.py @@ -76,7 +76,7 @@ def inner(*args, **kwargs): else: template_value = self.modifyer.async_render() - price = round(template_value * (1 + self.vat), 5) + price = round(float(template_value * (1 + self.vat)), 5) return price