[Xiaomi Poco F3 / Xiaomi Mi 11X / Redmi K40] bozinsky73:
I got it working with macrodroid, thanks to an old macro I've edited few months ago.

This is the code extracted from macro:

{"exportedActionBlocks":[],"isActionBlock":false,"isBeingImported":false,"isClonedInstance":false,"isFavourite":false,"localVariables":[],"m_GUID":-6269841000317469372,"m_actionList":[{"childrenCollapsed":false,"m_SIGUID":-5416823282750948652,"m_classType":"IfConditionAction","m_comment":"Notifications Present","m_constraintList":[{"m_not":false,"m_siGuidThatInvoked":-6626150931826256597,"m_triggerName":"Notification Received: Any Content (Slack, WhatsApp, Duo, Keep Notes, Tasks, Instagram, Messages, Phone, Gmail, Boost, Outlook, Assistant, Discord, Calendar)","m_SIGUID":-5896898691553688918,"m_classType":"TriggerThatInvokedConstraint","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false},{"m_not":false,"m_siGuidThatInvoked":-6140494897453773703,"m_triggerName":"Screen Off","m_SIGUID":-5705167132551217043,"m_classType":"TriggerThatInvokedConstraint","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false}],"m_isDisabled":false,"m_isOrCondition":true},{"m_option":0,"m_settingOption":1,"m_SIGUID":-6651299717973982907,"m_classType":"AmbientDisplayAction","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false},{"m_SIGUID":-7411718013729515728,"m_classType":"EndIfAction","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false},{"childrenCollapsed":false,"m_SIGUID":-6694646151752884885,"m_classType":"IfConditionAction","m_comment":"Notifications Not Present","m_constraintList":[{"m_not":false,"m_siGuidThatInvoked":-5338778872961560012,"m_triggerName":"Notification Cleared: All applications","m_SIGUID":-8793856277619607922,"m_classType":"TriggerThatInvokedConstraint","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false},{"m_not":false,"m_siGuidThatInvoked":-4723004273042167899,"m_triggerName":"Screen Off","m_SIGUID":-5427740836992969920,"m_classType":"TriggerThatInvokedConstraint","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false}],"m_isDisabled":false,"m_isOrCondition":true},{"m_option":1,"m_settingOption":1,"m_SIGUID":-7626558880651455986,"m_classType":"AmbientDisplayAction","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false},{"m_SIGUID":-5329181661507490444,"m_classType":"EndIfAction","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false}],"m_category":"Personalizzazione","m_constraintList":[],"m_description":"Turn on AOD only when you receive specific notifications","m_descriptionOpen":false,"m_enabled":true,"m_excludeLog":false,"m_headingColor":0,"m_isOrCondition":false,"m_name":"Selective Always On Display - LED Notification Replacement","m_triggerList":[{"m_screenOn":false,"m_SIGUID":-6140494897453773703,"m_classType":"ScreenOnOffTrigger","m_comment":"AOD On","m_constraintList":[{"enableRegex":false,"m_applicationNameList":["WhatsApp","Duo","Keep Notes","Gmail","Boost","Instagram","Outlook","Assistant","Messages","To Do","Discord","Calendar"],"m_exactMatch":false,"m_excludes":false,"m_excludesApps":0,"m_option":0,"m_packageNameList":["com.whatsapp","com.google.android.apps.tachyon","com.google.android.keep","com.google.android.gm","com.rubenmayayo.reddit","com.instagram.android","com.microsoft.office.outlook","com.google.android.apps.googleassistant","com.google.android.apps.messaging","com.microsoft.todos","com.discord","com.google.android.calendar"],"m_textContent":"","m_SIGUID":-8805042043112630616,"m_classType":"NotificationPresentConstraint","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false}],"m_isDisabled":false,"m_isOrCondition":false},{"enableRegex":false,"m_applicationNameList":["Any Application"],"m_exactMatch":false,"m_excludeApps":false,"m_excludes":false,"m_ignoreOngoing":true,"m_option":0,"m_packageNameList":["Any Application"],"m_soundOption":0,"m_supressMultiples":true,"m_textContent":"","m_SIGUID":-6626150931826256597,"m_classType":"NotificationTrigger","m_constraintList":[{"enableRegex":false,"m_applicationNameList":["WhatsApp","Duo","Keep Notes","Gmail","Boost","Instagram","Outlook","Assistant","Messages","To Do","Discord","Calendar"],"m_exactMatch":false,"m_excludes":false,"m_excludesApps":0,"m_option":0,"m_packageNameList":["com.whatsapp","com.google.android.apps.tachyon","com.google.android.keep","com.google.android.gm","com.rubenmayayo.reddit","com.instagram.android","com.microsoft.office.outlook","com.google.android.apps.googleassistant","com.google.android.apps.messaging","com.microsoft.todos","com.discord","com.google.android.calendar"],"m_textContent":"","m_SIGUID":-5165517697350677515,"m_classType":"NotificationPresentConstraint","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false}],"m_isDisabled":false,"m_isOrCondition":false},{"enableRegex":false,"m_applicationNameList":["Any Application"],"m_exactMatch":false,"m_excludeApps":false,"m_excludes":false,"m_ignoreOngoing":true,"m_option":1,"m_packageNameList":["Any Application"],"m_soundOption":0,"m_supressMultiples":true,"m_textContent":"","m_SIGUID":-5338778872961560012,"m_classType":"NotificationTrigger","m_comment":"AOD off","m_constraintList":[{"enableRegex":false,"m_applicationNameList":["WhatsApp","Duo","Keep Notes","Gmail","Boost","Instagram","Outlook","Assistant","Messages","To Do","Discord","Calendar"],"m_exactMatch":false,"m_excludes":false,"m_excludesApps":0,"m_option":1,"m_packageNameList":["com.whatsapp","com.google.android.apps.tachyon","com.google.android.keep","com.google.android.gm","com.rubenmayayo.reddit","com.instagram.android","com.microsoft.office.outlook","com.google.android.apps.googleassistant","com.google.android.apps.messaging","com.microsoft.todos","com.discord","com.google.android.calendar"],"m_textContent":"","m_SIGUID":-5048532498719382656,"m_classType":"NotificationPresentConstraint","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false}],"m_isDisabled":false,"m_isOrCondition":false},{"m_screenOn":false,"m_SIGUID":-4723004273042167899,"m_classType":"ScreenOnOffTrigger","m_constraintList":[{"enableRegex":false,"m_applicationNameList":["WhatsApp","Duo","Keep Notes","Gmail","Boost","Instagram","Outlook","Assistant","Messages","To Do","Discord","Calendar"],"m_exactMatch":false,"m_excludes":false,"m_excludesApps":0,"m_option":1,"m_packageNameList":["com.whatsapp","com.google.android.apps.tachyon","com.google.android.keep","com.google.android.gm","com.rubenmayayo.reddit","com.instagram.android","com.microsoft.office.outlook","com.google.android.apps.googleassistant","com.google.android.apps.messaging","com.microsoft.todos","com.discord","com.google.android.calendar"],"m_textContent":"","m_SIGUID":-7000913099266572021,"m_classType":"NotificationPresentConstraint","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false}],"m_isDisabled":false,"m_isOrCondition":false}]}View attachment 5633047