Setting Up Thermostat Temperature Change Alerts

Hey everyone, I wanted to share my experience setting up alerts for when my thermostat’s target temperature changes. It was a bit of a learning curve, but I figured it out and thought I’d walk through my process in case anyone else is tackling something similar.

So, the goal was to get notified whenever the target temperature (either high or low) on my thermostat changes. Whether it’s adjusted manually or through an automation, I wanted to know about it. I started by looking into the climate.set_temperature service in Home Assistant, which seemed like the right place to start since it’s where the temperature adjustments happen.

I read through the documentation and some community posts, and it looked like I needed to create a template sensor to track these changes. The idea was to have the sensor monitor the target_temp_high and target_temp_low attributes of my thermostat and trigger an alert when either changes. Sounds straightforward, right?

But here’s where it got tricky. I tried setting up the template sensor using the state_attr function to pull the target temperatures, but I kept getting errors. The error message mentioned an invalid template syntax, which was confusing because I thought I was following the examples I found. I tried different variations, checked the syntax, and even looked into the logs to see if there were more details, but nothing stood out.

After some trial and error, I stumbled upon a forum post where someone suggested using a different approach with the value_template. They mentioned wrapping the state_attr calls in a conditional to handle cases where the attributes might not be present. That gave me an idea, and I decided to simplify my template to see if that was the issue.

Here’s what I ended up with:

yaml
sensor:

  • platform: template
    sensors:
    thermostat_temp_change:
    friendly_name: “Thermostat Temp Change”
    value_template: “{{ state_attr(‘climate.my_thermostat’, ‘target_temp_high’) | default(‘unknown’) }}”
    icon: mdi:thermometer
    unit_of_measurement: “°F”

This simplified version helped me identify that the issue wasn’t with the syntax but rather with how the attributes were being accessed. Once I realized that, I could build a more robust template that handles both target_temp_high and target_temp_low and triggers an alert when either changes.

Now, whenever the temperature settings on my thermostat are adjusted, I get a notification through my preferred method (in my case, Pushbullet). It’s been working perfectly, and I feel much more in control of my home’s comfort settings.

If anyone else is trying to set something like this up, I’d be happy to help troubleshoot or share more details about my setup. It’s a small victory, but it makes a big difference in how I interact with my smart home!