Fix dishwasher price planning template
This commit is contained in:
@@ -39,9 +39,9 @@
|
||||
{% set total = namespace(value=0, missing=false) %}
|
||||
{% for offset in range(4) %}
|
||||
{% set target = base + (offset * 3600) %}
|
||||
{% set match = ns.prices | selectattr('ts', 'eq', target) | list | first %}
|
||||
{% if match %}
|
||||
{% set total.value = total.value + (match.price | float(999)) %}
|
||||
{% set matches = ns.prices | selectattr('ts', 'eq', target) | list %}
|
||||
{% if matches | count > 0 %}
|
||||
{% set total.value = total.value + (matches[0].price | float(999)) %}
|
||||
{% else %}
|
||||
{% set total.missing = true %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user