Homey Community Forum

Bedtime routine when charging

I have a Zigbee connected power outlet that measures power. I have a flow setup that when the power becomes greater than 0 Watts to begin a flow that confirms that I am in bed, and if I say OK, it will shut down all lights, TVs, locks the doors etc.

It seems that the power must go to zero at some points in the middle of the night and when I wake up I have about 10 different notifications that ask if I am in bed. Is there anyway to have a timeout during a set duration or only ask the question once per night?

Here is the flow as I have it set now:

Disable the flow and enable it at 22.45
So THEN start bedtime AND disable the flow.
WHEN time is 22.45 THEN enable the flow.

1 Like

Hoi!
Actually i see there quite much possibilities to realize The Goal :slight_smile:
May-be the simplest way is to keep in mind (some variable) when the confirmed bed time occurs and then do not re-ask again within couple of hours (how long You usually sleep).
If You love a complex and compact logic in flow, then You just need a variable, containing timestamp of last “bed-time” (set from “Then part”) and in “And part” to compare, if timestamp is old enough.
Little bit more spread (but actually simpler) solution is a external count-down timer (there are multiple apps, providing such things - so, use this one, You already have installed; or use the first one You can find).
So: The “bedtime” in “Then part” sets a countdown timer for “You usually sleep” seconds and in “And part” the flow just checks the timer - to continue only, if timer is stopped.
Similar, but requiring one more flow is to disable main flow in main flows “Then part” and start countdown timer. And with countdown end to associate a flow/event, which one re-enables the main flow.

PS. As i’m total newcomer here, may-be some more familiar with Homey can give hints about the cost of different solutions. How much improves the flow-disabling overall performance of system; and is this a crime to do timestamp calculations every time the power changes

What I ended up doing which I think is most simplest, was disable the flow after confirmation per @Rocodamelshekima - Thanks for the obvious but overlooked suggestion. I then created a new flow that enables the previous flow daily at 10pm

1 Like