Temperature Trend Sensor

Looking for some help with creating a temperature trend sensor that can monitor an outdoor sensor and indicate if temperature is rising, falling or steady (1 degree rise or fall per hour otherwise steady). I was able to get this using 2 different trend helper sensors that indicate hot or cold based on rising or falling temps but I would like to combine this into one sensor that I can have a history graph on and use for automation. Any help with this would be appriciated.

So you have two of these?

And you want a single sensor to tell you these states?

  • Rising
  • Falling
  • Steady

You could do something like this:

template:
  - sensor:
      - name: Temperature Trend
        state: >
          {% if is_state('binary_sensor.rising','on') %}
            Rising
          {% elif is_state('binary_sensor.falling','on') %}
            Falling
          {% else %}
            Steady
          {% endif %}
        icon: >
          {% if is_state('binary_sensor.rising','on') %}
            mdi:thermometer-chevron-up
          {% elif is_state('binary_sensor.falling','on') %}
            mdi:thermometer-chevron-down
          {% else %}
            mdi:thermometer-minus
          {% endif %}
1 Like

Thank you, that seems to be working perfectly.