Hold notifications then deliver later

I need some help. I want to create a flow or addition to flows that will hold certain notifications while I am asleep then deliver them 30 minutes after I wake up.

I have my CPAP machine plugged into a smart power strip with power monitoring. When the CPAP is running the power goes up and toggles in Homey that I am asleep or awake.

Now I have several flows that alert me except when I am asleep. I want Homey to hold the notification until 30 minutes after Homey tags I wake up after I take off the CPAP and the power drops.

I am not sure if it should be added to each flow with a notification or if I need to create a new flow to govern the notifications…

Perhaps you could have a look at ideas suggested in the posts in Delayed push message.

My thoughts went to put it in a variable (which also been suggested in that post), but perhaps one of the other ideas could help you better.

You could add a different timer for each notification that restarts itself as long you are asleep. When you are wake up the timer doesn’t restart and ends. When the timer ends wait 30 minutes before sending the notification.

Just being curious because i don’t understand it:

How does a notification that is created by a flow now (based on your flow at the time “Wim post is not awake” is true) being stored/saved and only send when (Based on your flow) “Wim post is awake” ?

In the flow from the topicstarter the ‘send-notification’-card should be replaced by everything starting from ‘start-button’.
So this is not a separate flow.

I created this flow that allows multiple processes to register messages that will be stored as a json object in a variable using Homey script.

These messages can then be converted in a greeting message that will be announced through the hallway Sonos speaker when a person steps into the hallway right after the last person woke up in the morning, or the first person came home. Although not precisely the same use case, but i think parts of it can be useful. It requires two small homey scripts and two small flows.

This is the flow that can be called with a text value from any other flow to register a message.

This is the small homey script that takes a text argument and adds it to a list of messages and stores it as json in a variable.

This is is the flow that is responsible for generating the greeting and announcing it through the Sonos speaker. This can be modified to simply send a push notification directly.

This is the script that turns a list of messages into a greeting.

This is is a flow that uses the mechanism to register a message. In my system it is possible to interpolate the status into the message, where you want.

Hopefully this is useful to you.