Hi Troon!
I’am back to you maybe you remember for this script.
I wanna make more ‘if’ possibilities but can not solve it.
Something like this:
forecast: >
{% set forecast = states.weather.forecast_otthon.attributes.forecast %}
{% set ns = namespace(fore_adj=[]) %}
{% for item in forecast %}
{% set owt, owtl = item['temperature'], item['templow'] %}
{% set ns.fore_adj = ns.fore_adj +
[dict(item,
**{'ow_temperature': owt,
'ow_templow': owtl,
'temperature': {% if owt > 5 owt*0.7 | round(0) %}
{% elif owt > 10 owt*0.8 | round(0) %}
{% elif owt > 15 owt*0.78 | round(0) %}
{% endif %}
'templow': {% if owtl > 5 owtl*0.7 | round(0) %}
{% elif owtl > 10 owtl*0.8 | round(0) %}
{% elif owtl > 15 owtl*0.78 | round(0) %}
{% endif %}
{% endfor %}
{{ ns.fore_adj }}
Can you help me please?