I haven't been motivated for the last several months due to some work stress, but that is changing and it's a new year. Time to come back to do some blogging.
Back in June of '24, I wrote an article about using humidity sensors around my house and integrating them with Home Assistant. I intended to follow that up with this article on getting some alerting going when the humidity got too high.
Shortly after I wrote that post, the freezer got left open just enough to cause a problem. I found that AcuRite also has refrigerator and freezer sensors . Now, in total, I have 6 humidity sensors around the house and a pair of frig/freezer sensors.
Prep work
I'm using the built-in HTML5 push notifications to get my alerts. My desktop and phones use the PWA version of the app.
You'll need to follow HA's instructions for enabling the push notifications .
Setting Up the Alerts
There are two ways you can set up the automation. You can either do it from the UI (which is probably easier) or you can add the code to the automation.yaml
file.
- From your HA instance, you'll want to go to Settings → Automations & scenes → Create Automation → Create new automation.
- Click the "Add Trigger" button, select Entity, and then select "Numeric state".
- You'll want to populate the Entity section with one or more sensors. For my setup, I have all of my humidity sensors listed in one automation.
- For the Attribute, select "Humidity". You could also create an alert for temperature or battery level.
- I set the lower limit to a "Fixed number" of above 60. That means that if any sensor reaches a humidity of 61 or more, this automation will trigger.
- In the "For" box, I set mine to 15 minutes. The added condition will help avoid excessive alerting. The humidity has to be 61 or more for at least 15 minutes before the automation will trigger.
- Under "Then do" click "Add Action".
- Search for "html5" and select "Notifications: Send a notification with html5".
- Click on the kebab menu and select "Edit in YAML". Because this automation uses templates, you can't use the visual editor.
- Add the code below and save.
data:
message: |
{{ trigger.to_state.name }} too high for {{ trigger.for }}
title: |
Humidity sensor is high at {{ now().strftime('%m/%d %I:%M%p') }}
url: https://ha.jonathanpeterson.dev:8123/lovelace/monitoring
action: notify.html5
Here's an example of what this alert would look like.

I did the same thing for both the fridge and freezer. Find what numbers work for you.
Here's what the automation looks like in the UI.

I hope that was helpful to you. Let me know if you have any questions in the comments or would be interested in other HA topics!
Comments
You can also comment directly on GitHub.