#Window Sensor Timer: If 10min open, then notification or sound
1 messages · Page 1 of 1 (latest)
you can trigger on the state changing to "open" for 10 mins.
e.g.
oohohohhoh, okay nice. Where do i find this window?
that is in the automation editor
add a state trigger
ah thanks.
and then i add an action, right?
yeah
I have no targets tho
where are you wanting to send the notification?
to send messages to a mobile device via the companion app you need to select the specific notification action for that device
ah okay, what if i want to have HA just make a sound and change the color of the field to a bright red?
Can i send a message on my PC via hass agent?
changing things on the dashboard requires a bit of a different approach depending on exactly how you want it to display.
perhaps, its been a while since i have used hass agent tbh.
imma see what chatgpt says and if i have some issues, I come back :)
I have this automation, which sends me and my girlfriend a push notification to the phones via pushover. after 20, 30, etc. Minutes
alias: Bathroom Window Alert
description: Alert if bathroom window open 20+ min during night hours
triggers:
- entity_id:
- binary_sensor.badezimmer_fenster
to: "on"
trigger: state
conditions:
- condition: time
after: "20:00:00"
before: "06:00:00"
enabled: false
actions:
- delay:
minutes: 20
- condition: state
entity_id: binary_sensor.badezimmer_fenster
state: "on"
- action: notify.pushover
data:
message: ⚠️ Bathroom window has been open for 20 minutes 🪟
data:
priority: 0
- delay:
minutes: 10
- condition: state
entity_id: binary_sensor.badezimmer_fenster
state: "on"
- action: notify.pushover
data:
message: "🚨 URGENT: Bathroom window still open for 30 minutes! 🪟❄️"
data:
priority: 1
sound: persistent
- repeat:
while:
- condition: state
entity_id: binary_sensor.badezimmer_fenster
state: "on"
sequence:
- delay:
minutes: 10
- condition: state
entity_id: binary_sensor.badezimmer_fenster
state: "on"
- action: notify.pushover
data:
message: >-
🚨 REMINDER: Bathroom window still open! ({{ 30 + repeat.index *
10 }} min) 🪟❄️
target: 11_hermine
data:
priority: 1
sound: persistent
mode: restart
@sage crag
🙏 holy moly
i want the notification be send via MQTT tho
into my PC
Why mqtt?
https://pushover.net/
is available for PC
You could also set up a discord webhook probably
cause im already using that for temp and usage readouts
I dont think its good for notifications, but if you already found a program/software for ur pc to show the mqtt notifications you can use the MQTT Notify instead of my pushover notification
https://www.home-assistant.io/integrations/notify.mqtt/
oh thanks
I use Mosquitto broker
But only serverside right? You still need a client to receive those messages
yeah for client i use HASS.Agent.
i think it can be done way simpler
HASS.agent has some notification configuration
but
I don't know how i can select it in HA
wait
i have actually not restarted HA yet
.....
maybe i should do that
Does that mean when x and x then do y OR when x or x then do y?
you need to use and if, the first stuff is the triggers, then conditions, then actions
Triggers are ORed conditions are ANDed
I would remove the From: Closed.
Then if you have a connection issue and it goes Closed>unavailable>Open it will still trigger
great idea actually