# Trigger flow on ipad unlocked

**URL:** <https://community.homey.app/t/trigger-flow-on-ipad-unlocked/85429>\
**Category:** Flows\
**Created:** [July 28, 2023, 10:34am UTC](https://community.homey.app/t/trigger-flow-on-ipad-unlocked/85429 "2023-07-28T10:34:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronald\_N](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronald_n/32/12938_2.png) [@Ronald\_N](https://community.homey.app/u/Ronald_N)\
**Post date:** [July 28, 2023, 10:35am UTC](https://community.homey.app/t/trigger-flow-on-ipad-unlocked/85429/1 "2023-07-28T10:35:00Z")

</div>

Hey guys,

I have the following situation. My girlfriend has a ipad she uses for watching tv in bed occasionally. I want to automate sonos to play for half an hour when we went to bed, but want to make it stop playing if she unlocks the tablet.

I did try it with an IOS automation “When app is started” \> start flow (flow sets a variable to YES) but since the does not close off the app all the time, it does not work.

Is there a way to start the flow on Homey, when the ipad unlocks itself/shows screen/starts playing a videofeed or something?

Might be a workaround true siri, google home or something im missing here.
