Hello,
I’m implementing templates with the new macro functionality. However, it looks like or statements aren’t working.
Consider the following template:
{% from 'helpers.jinja' import is_last_changed_in_time_out %}
{% from 'helpers.jinja' import is_entity_currently_on %}
{% set last_changed = is_last_changed_in_time_out(area_name, states.binary_sensor, "presence", occupancy_time_out) %}
{% set is_on = is_entity_currently_on(area_name, states.binary_sensor, "presence") %}
{{ last_changed or is_on}}
{% endmacro %}
If last changed is true and is_on is false the template is true. if last_changed is false and is_on is true it returns false. However, i’m using an or and i would expected the order doesn’t matter. Does someone know if this is a bug?
aka:
true or false = true
false or true = false