Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105625

Average temperature based on multiple temperature sensors

$
0
0

Hello,

Using following template sensor:

  {% set t1 = states('sensor.wifi_temperature_humidity_sensor_temperature') %}
  {% set t2 = states('sensor.hue_keuken_sensor_temperature') %}
  {% set t3 = states('sensor.hue_tv_sensor_temperature') %}
  {% set t4 = states('sensor.daikin_airco_leefruimte_climatecontrol_room_temperature') %}
  {% if t1 != 'unavailable' and t2 != 'unavailable' and t3 != 'unavailable' and t4 != 'unavailable' %}
    {{ ((t1 | float + t2 | float ) / 2) | round(2) }}
  {% elif t1 == 'unavailable' and t2 != 'unavailable' %}
    {{ (( t2 | float )) | round(2) }}
  {% elif t1 != 'unavailable' and t2 == 'unavailable' %}
    {{ (( t1 | float )) | round(2) }}
  {% else %}
    {{ states('sensor.average_living_temp') }}
  {% endif %}

How can I update the template to include T3 and T4?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 105625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>