Trigger "User absent"

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Post Reply
tempe222
Posts: 7
Joined: 11 Jan 2019 09:40

Trigger "User absent"

Post by tempe222 » 12 Jan 2019 07:42

This trigger when locking the screen would be very helpful for battery saving actions.

Tempe

User avatar
Desmanto
Posts: 1757
Joined: 21 Jul 2017 17:50

Re: Trigger "User absent"

Post by Desmanto » 12 Jan 2019 11:20

Locking the screen will turn it off. Why don't just use Trigger "Display State" - off?
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190512, Pie 9.0, Rooted.

tempe222
Posts: 7
Joined: 11 Jan 2019 09:40

Re: Trigger "User absent"

Post by tempe222 » 12 Jan 2019 21:46

It's not the same because this triggers flows e.g. when you just turn on the display for seeing the time or if you have new messages (i.e. not unlocking) and the screen turns off again by itsself

User avatar
Desmanto
Posts: 1757
Joined: 21 Jul 2017 17:50

Re: Trigger "User absent"

Post by Desmanto » 13 Jan 2019 17:51

Let me rephrase your need (CMIIW). What you want is
Screen off : turn on battery saver
Unlock screen : turn off battery saver.

If that so, use
Trigger Display State - off : turn on battery saver
Trigger User Present : Turn off battery saver

Don't use Trigger Display State - On, for turning off battery saver, as you haven't unlocked the phone yet (only to check time). Using User present, the flow only triggered after you successfully unlock the phone; turning the screen on won't trigger it.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190512, Pie 9.0, Rooted.

lojzik
Posts: 9
Joined: 10 Sep 2018 08:03

Re: Trigger "User absent"

Post by lojzik » 14 Jan 2019 06:36

Sometimes phone is not locked after "display off" immediately, so If I switch on phone after "display off", I get only "display on" trigger without "User present" trigger and phone is not locked. So "user present" can't be paired with "display off"

User avatar
Desmanto
Posts: 1757
Joined: 21 Jul 2017 17:50

Re: Trigger "User absent"

Post by Desmanto » 14 Jan 2019 16:53

You can try to check at your lockscreen setting, change the lockscreen after timeout to immediately. But if you still want some buffer time, example 5-10 seconds; you can still do the same buffer in the Screen off flow.

Use Condition Keyguard Locked to check if the screen is off and locked. If it hasn't yet, false, go to sleep 5-10 seconds (depends on the delay), and check again using another Keyguard locked. Both true from both Keyguard Locked, turn on the battery saver. So in case, you turn on the screen before the 5-10 seconds delay, then the condition will be false, battery saver is not enabled during that period. It will wait until another cycle of screen off, triggering the flow again and only after finally confirm it is locked, then it will enable the battery saver.

The exit still the same trigger, user present, turn off battery saver.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190512, Pie 9.0, Rooted.

Post Reply