#Need practice on templates

1 messages · Page 1 of 1 (latest)

latent mountain
#

@fading kettle
The indents are different between the 2.
There is no {% endif %}.
The "{{input_number.orderstoprocess}}" will show up as text.
This is a Template question not a Blueprint question, but we'll help you here anyway.

#

Also what Tinkerer said...

#

The data statement should look more like this...

  data:
    value: >
      {% if trigger.json["OrdersToProcess"] | is_number %}
        {{ trigger.json["OrdersToProcess"] }}
      {% else %}
        {{ states("input_number.orderstoprocess") }}
      {% endif %}

is_number reference

fading kettle
#

Hey mate, thanks so much for helping me! I fixed this and as you said I moved the question to #templates-archived where I found some more help there!