Template error after update

I’m seeing this on a template sensor:

It has previously been reliable and something has changed that I can’t figure.

I have it configured thus:

- sensor:
    - name: LPG Left Bank weight stability
      friendly_name: Left bank stability
      unique_id: lpg_left_bank_weight_stability
      state: >
        {% if is_state('sensor.quin_generator_lpg_controller_left_steady_state', 'unavailable') %}
          Unavailable
        {% elif states('sensor.quin_generator_lpg_controller_left_steady_state') | int == 1 %}
          Stable
        {% elif states('sensor.quin_generator_lpg_controller_left_steady_state') | int == 0 %}
          Unsteady
        {% else %}
          Error
        {% endif %}

When I run it through the template checker in dev tools it works fine.

Other template sensors in the same file are working okay.

I’ve tried reloading the templates and a full restart.

I just know this is going to be something obvious. What am I missing?

That is not a valid option. Remove it.

The available options are listed here: Template - Home Assistant

Thank you.That fixed it. Is this a recent change? It has worked before.

No it was never an option. There have been some changes to the template integration this release. It might just be better at catching this sort of thing.

Nope, nothing changed in that regard. This would have errored before.

1 Like