-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Discussed in #211
Originally posted by Wopples October 23, 2024
Here's my template:
{% set s = {"B": 13.72,"C": 1.220,"D": 13.72,"E": 0.830,"CF": 0.3333,"CP": 128.99,"ENV": 1.0195,"BHE": 10.89,"WKK": 5.04,"BA": 12.3606,"BTW": 1.21 } %}
{% if states('calendar.belgium') == 'off' %}
{% if now().isoweekday() < 6 %}
{% if now().hour >= 7 and now().hour < 22 %}
{{((s.B+s.C*((1-s.CF)*current_price+s.CF*s.CP))*s.ENV+s.BHE+s.WKK+s.BA)*s.BTW | float }}
{% endif %}
{% endif %}
{% else %}
{{((s.D+s.E*((1-s.CF)*current_price+s.CF*s.CP))*s.ENV+s.BHE+s.WKK+s.BA)*s.BTW | float }}
{% endif %}
It works in the developer tools template but when I paste it in in the Entso configuration it returs an error: "could not convert string to float".
What am I missing?
Thanks for any help.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels