Window open - Alexa Notification

Hi,
sorry but I’m new to HA (ioBroker user for now) and have a question regarding a simple automation.

I want an Alexa notification (Push and Text) when a window was opened for xx minutes.
So far no problem… But I want a notification too, when this window has been closed. But this “closed-notification” should only be activated, when the window was closed after it was opened for xx minutes.

With ioBroker the solution was like this:

As a noob to HA - what would be the counterpart in Ha?

Thanks

This automation checks if a window sensor has been open for 30 seconds or more, then sends me a push notification to my phone. I dont have alexa, but I imagine with the alexa integration you can send a notify to that device in a similar way.

The script referenced at the end is what I actually do when the open window has been detected (in this case pause the heating), but you dont have to have it in a separate script, you could just perform the action in the actions section of the automation:

`alias: "Set Tado: Open Window - Bedroom"
description: Pause heating on Open Window
trigger:
  - platform: state
    entity_id:
      - binary_sensor.bedroom_open_window
    from: "off"
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 30
action:
  - device_id: 12345
    domain: mobile_app
    type: notify
    message: "Open Window Detected: Bedroom"
    title: " Tado Alert"
  - service: script.set_tado_open_window_10_b
    data: {}
mode: single`

An alert is possibly your simplest solution.

It can send you a notification when the window has been open for X minutes, repeat that reminder at a given interval (you could set that to 24 hours), and then send you a notification when the window is closed.

Thanks a lot - will have a deeper look to the alerts!