PLEASE NOTE: it seems that the given shell command does not work on Android Oreo (OOS Open Beta as of writing). Check the latest posts of this thread for any progress.

Code: am broadcast -a com.android.systemui.doze.pulse com.android.systemui

I haven't had the time to get such a profile working until now, but I know that it can be archived easily.



Code: PROFILE Prox OFF State -> Sensor -> Proximity Sensor -> invert State -> Display -> Display State -> "Off" TASK Proximity uncovered Variable -> Set -> %Prox = false PROFILE Prox ON State -> Sensor -> Proximity Sensor State -> Display -> Display State -> "Off" TASK Proximity covered Variable -> Set -> %Prox = true PROFILE Wake Ambient Display State -> Display -> Display State -> "Off" State -> Variables -> Variable Value -> %Prox = true TASK Wake Proximity Display Task -> Wait -> 1s Task -> IF -> %Prox = false Code -> Run Shell -> am broadcast -a com.android.systemui.doze.pulse com.android.systemui (DON'T FORGET TO CHECK "USE ROOT")

EDIT #2: @Arstoien provided us with an improved version of my basic tasks, check it out here.

As most of you might know, OnePlus removed the proximity wake option from OOS lately, replacing it with the lift to wake feature. If you want to use the proximity wake feature, you either have to switch to a custom ROM or use an outdated version of OOS. Both options might be suited for most people, but in case you prefer to use latest OOS and still want to use proximity wake, I have some kind of workaround.I came across this shell command, which will trigger the ambient display:A big shoutout to @ Quinny899 for providing me the code to trigger ambient display by shell command.You can use this command with Tasker to trigger it when the proximity sensor is covered for some seconds or even when you wave your hand over it.In case you use the above command, ensure you check the "use root" option in Tasker's context menu for the shell command!EDIT: I managed to get this workingBelow my implementation. I am sure there is room for optimization, but this is just a basic task and it works for me (OOS 4.5.13 with Tasker 5.0u6).You need three profiles. Two of them will check the proximity sensor state while screen is off, the third one actually triggers the ambient display while screen is off and proximity sensor has been covered (by waving over it for example).Let's have a look at the needed profiles:That's it. Now turn off your screen and try to wake the ambient display by waving your hand over the proximity sensor.