I am using a template helper to calculate the relative temperature based on the temperature, the wind and humidity:
{% set temperature1 = states('sensor.temperatur_farstu_air_temperature_8') | float(0) %}
{% set humidity1 = states('sensor.are_humidity') | float(0) %}
{% set windspeedmps1 = states('sensor.arewindspeed_mpers') | float(0) %}
{% set wvp1 = (humidity1/100) * 6.105 * e**((17.27*temperature1) / (237.7 + temperature1))%}
{{ (temperature1 + 0.33 * wvp1 - 0.70 * windspeedmps1 - 4.00)|round }}
What I would like to to is to use a condition for using one or another entity on the first row in the variable “temperature1”. Something like
if bypass=0 then temperature1 = entity1
if bypass=1 then temperature1 = entity2
Does anybody knows if this is possible and in this case what I should write in my template helper?