Automation: trigger for "window open"

Hey,

is it possible to create a trigger when the temperature drops X degrees within Y minutes?

I want to send a Telegram message afterwards, that’s just by the way.

My kids leave the windows open all the time :smiley:

You can use the Trend integration to create a sensor to use as a trigger, but a physical window/door sensor is a better bet.

You can install contact sensor in window frame so it will detect when window is open. You can also put temperature sensor outdoor.
The rest is easy if you have set up telegram in home assistant. Just make some automation that will send you a message if window is open more that 30 second and the temperature outside is 5 degrees or less.

Thank you for your input. “Trend integration” is the correct hint, thanks Drew.

@Daniel: Of course I could use contact sensors, but I have 28 windows here. I will try
Telegram Bot is already working and is sending messages when it has to.

but I have 28 windows here<

well welcome to the club. I started to adding contact sensors in my windows frames because I have the same problem as you. But my brother usually open the door and leave it. I don’t say that you have to doit all in once but in my experience with it so far, for a month or so, it seems to me as a best solution.