More template fun from me today, I see historically you could use value templates when creating a template sensor, but I can’t see anything like that in the documentation for the modern templates,
Basically I am trying to take the value from a sensor and pass it on, unless it’s ‘unavailable’ in which case replace it with N/A or Off.
You want to output the existing state of the sensor in the event the source sensor is unavailable I assume, this does that.
You can also tidy it up it a bit like this:
{% set c = states('sensor.kitchen_timer') %}
{% set e = states('sensor.kitchen_echo_next_timer') %}
{{ c|float(0) if e in ['unknown','unavailable'] else e|float(0) }}
Cheers lads and lasses, gotten it working thanks to Code_talker, I have no idea why I am having soo much trouble with templates, it’s all new to me and having to learn it all, getting there slowly.