I have a problem with template sensor as an example below. I have several sensors to detect the temperature in an area to be sure at least one is working. My solution has been combined sensor below. (only two sensors in this example)
In my case this does not work. Having zigbee sensors it looks like even the sensor has dropped out of system HA still show the last value for a long time before changing the status to unavailable.
temp_combined:
friendly_name: "Temp Combined"
unit_of_measurement: '°C'
value_template: >
{% if states('sensor.temp1') not in ['unknown', 'unavailable', 'none'] %}
{{ '%0.1f'|format(states('sensor.temp1')|float + 0.7) }}
{% else %}
{{ states('sensor.temp2')}}
{% endif %}
Now is there a way to create a template sensor which shows the last updated value of a group of sensors?
It would be highly appreciated if someone can help me out with this question.