Smart Home Automation

Home Assistant Push Alerts

Home Automation Experts
4 min read

I’ve got a pretty complex smart home setup with over 200 devices connected to my Home Assistant hub, and one thing I’ve learned is that push notifications can be both super helpful and utterly annoying if not set up correctly. For instance, I don’t need to know every time my smart thermostat adjusts the temperature by a degree or two, but I do want to be alerted if someone’s walking around my house when it’s freezing outside and the heat is off. That’s why I’ve spent some time configuring Home Assistant to send push notifications only when my motion sensor detects movement and my smart thermostat reads below 60°F.

Configuring Motion Sensors for Push Notifications

To get started, you’ll need to make sure your motion sensors are properly configured in Home Assistant. I’m using a few different models, including the Zigbee-based Xiaomi Aqara sensors and some Z-Wave sensors from Aeotec. These devices are all pretty reliable, but they can be a bit finicky when it comes to setting up notifications. For example, I had to tweak the sensitivity settings on my Aqara sensors to prevent them from triggering false positives every time my cat walked by. Once you’ve got your motion sensors set up and calibrated, you can start thinking about how to integrate them with your smart thermostat.

Setting Up Smart Thermostat Integrations

My smart thermostat of choice is the Ecobee SmartThermostat, which integrates beautifully with Home Assistant. One thing I love about this device is its ability to read the temperature in different parts of my house, not just at the thermostat itself. This is especially useful during the winter months when it can get pretty chilly in my drafty old Victorian. To set up push notifications based on temperature readings, you’ll need to create a new automation script in Home Assistant that checks the current temperature and triggers a notification if it’s below 60°F. I’ve got this script set up to run every 5 minutes, which seems frequent enough to catch any significant temperature drops without overwhelming me with notifications.

Creating Automation Scripts for Custom Push Notifications

Creating custom automation scripts is where things can get really powerful in Home Assistant. For instance, I’ve written a script that checks the current temperature and motion sensor status every 10 minutes, and sends me a push notification if both conditions are met (i.e., it’s below 60°F and there’s motion detected). This script uses a combination of conditional statements and entity IDs to determine when to trigger the notification. One thing to keep in mind when writing these scripts is that you’ll need to use the correct entity IDs for your devices, which can be found in the Home Assistant UI under Configuration > Entities. For example, my Ecobee thermostat has an entity ID of sensor.ecobee_temperature, while my Aqara motion sensor has an entity ID of binary_sensor.xiaomi_aqara_motion.

Fine-Tuning Notification Triggers for Better Results

As you start playing around with custom push notifications, you’ll likely find that there are some false positives or unnecessary triggers that need to be ironed out. For example, I discovered that my motion sensor was triggering notifications even when it was just my family members walking around the house during the day. To fix this, I added a conditional statement to my script that checks the current time of day and only triggers notifications between 10pm and 6am, when I’m most likely to be asleep or away from home. This has reduced the number of unnecessary notifications significantly, from around 20-30 per day to just 2-3.

Using Home Assistant Push Notifications Only When Motion Sensor Detects Movement and Smart Thermostat Reads Below 60°F

Now that we’ve covered the basics of setting up motion sensors, smart thermostats, and automation scripts, let’s talk about how to put it all together. The key is to create a script that checks both conditions (motion detection and temperature reading) before triggering a push notification. This can be done using a combination of if statements and entity IDs, as I mentioned earlier. For instance, my script uses the following conditional statement: if state.binary_sensor.xiaomi_aqara_motion == 'on' and state.sensor.ecobee_temperature < 60. If both conditions are met, the script triggers a push notification with a custom message that includes the current temperature reading and a timestamp.

Troubleshooting Common Issues with Home Assistant Push Notifications

As with any complex smart home setup, there are bound to be some issues that arise when configuring Home Assistant push notifications. One common problem I’ve encountered is that my notifications weren’t being delivered consistently, even though my script was triggering correctly. It turned out that the issue was with my Home Assistant configuration file, which had a typo in the notify section. To troubleshoot this, I used the Home Assistant logs to debug my script and identify where things were going wrong. Another common issue is that your motion sensor or smart thermostat might not be reporting data correctly, which can cause false positives or negatives. In this case, it’s a good idea to check the device’s documentation and settings to make sure everything is configured correctly.

Get your Home Assistant setup sending you push notifications only when motion sensor detects movement and smart thermostat reads below 60°F – start by configuring your devices and writing custom automation scripts that integrate with your smart home hub.

Tags: #home assistant #push notifications #motion sensors #smart thermostats
Share: X / Twitter Facebook

Related Articles