I want to create automations that check data from OpenWeatherMap, Google Calendar, IMAP Email Content, and other integrations.
If a condition is detected, then it adds a related item to a list
When I’m leaving home, I get an alert of needed items
If I disconnect from my home station while needed items are still connected, I get an alert.
Here’s my test situation.
- If OpenWeatherMap detects [Chance of rain > 30%], add [Item = umbrella] to list
- [Umbrella] has a cheap tracker on it that detects my location or connection to my network. Can be zigbee, bluetooth, gps, or anything else. Just not WiFi (I experience internet drops frequently)
- If one of these conditions is detected, I get an alert to bring my umbrella
-
- My event + travel time begins in 30 minutes
-
- I’ve opened my front door (via motion or contact sensor)
-
- Alert is “Don’t forget to bring your umbrella!”
- If I start my “away” scene, and the umbrella remains at home, create an additional alert that says “Did you forget your umbrella?”
What I need:
- Item sensor/tracker: My main request for recommendation. There are a bunch of cheap options for zigbee sensors and gps trackers on Alibaba or Aliexpress. I consider this a generally low priority automation so I don’t want to spend AirTag money on this. I’d like to spend <$5 per sensor for a total of 8-10 sensors.
- Door sensor: Aqara is usually recommended
- Weather API: Seems like OpenWeatherMap is recommended
- YAML code:
`automation:
- alias: 'Umbrella Reminder'
description: 'Reminds you to bring your umbrella if chance of rain is over 30%'
trigger:- platform: time
at: '07:00:00' # Adjust this time to when you typically prepare to leave
condition: - condition: numeric_state
entity_id: weather.dayton # Replace with your weather entity
attribute: precipitation_probability
above: 30
action: - service: notify.mobile_app_your_phone # Replace with your notification service
data:
title: 'Umbrella Reminder'
message: >-
There's a {{ state_attr('weather.dayton', 'precipitation_probability') }}% chance of rain today in Dayton. Don't forget your umbrella!`
- platform: time
`automation:
- alias: 'Alert Leaving Without Umbrella'
description: 'Alerts if you leave home without umbrella when chance of rain is over 30%'
trigger:- platform: state
entity_id: device_tracker.your_phone # Replace with your phone's device tracker
from: 'home'
to: 'not_home'
condition: - condition: numeric_state
entity_id: weather.dayton # Replace with your weather entity
attribute: precipitation_probability
above: 30 - condition: state
entity_id: device_tracker.umbrella # Replace with your umbrella's device tracker
state: 'home'
action: - service: notify.mobile_app_your_phone # Replace with your notification service
data:
title: 'Umbrella Left Behind'
message: >-
You left home without your umbrella, and there's a {{ state_attr('weather.dayton', 'precipitation_probability') }}% chance of rain today in Dayton!`
- platform: state