Had noticed @steve.maddigan's question from earlier and even though it's not time-based like Steve's question it reminded me of how I am currently handling my switch Notifications.
Not sure if this helps anyone but below is how I am currently pushing Notifications to my Inovelli Red Switches. (Also kind of hoping someone smarter than me might see this and share an even better solution!)
Variable Setup
I created a 4-5 variable booleans for different states (for example: when either my garage door or my back gate are left open I set the boolean to true, and when they are both closed I set the boolean to false)
I also have 4-5 Decimal Variables for each that hold the values for the color and animation of different notifications I use on my wall switches. (for example: "VarNotifyColorAlarm" = '33491710' and stays solid red if the alarm is on, while "varNotifyColorOutsideDoor" = '100600511' and pulses purple if the garage is left open... etc)
Last I created "varNotificationMaster" Decimal Variable that I use to trigger all my switches to update.
Ok now that all that is out of the way, my first rule manages the priority order of notifications and updates the final "varNotificationMaster" variable accordingly. It looks something like this:
Trigger Events:
varNotificationOutsideDoorOpen, varNotificationAlarmArmed any turns "changed"
Select Actions to Run:
Wait for event: --> elapsed timeL 00:00:02
If varNotificationAlarmArmed is on THEN
Set varNotificationMaster to VarNotifyColorAlarm
Exit Rule
ELSE-IF varNotificationOutsideDoorOpen is on THEN
Set varNotificationMaster to VarNotifyColorOutsideDoor
Exit Rule
ELSE
Set varNotificationMaster to 0.0
END-IF
Last, the second/final rule actually triggers the notifications and looks something like this:
Trigger Events:
varNotificationOutsideDoorOpen, varNotificationAlarmArmed any turns "changed"
Select Actions to Run:
startNotification(varNotificationMaster) on Entry Wall Switch, Office Wall Switch, Outdoor Back Wall Switch
This is probably far more complex than it needed to be but in my defense I can say it's been working flawlessly for about 2-3 weeks now without any issues updating both my Red Series Dimmers and Fan + Light switches at the same time.
If the notification bars are showing red (alarm on) and someone uses one of the switches to turn on the light in that room... the default switch color of blue will light up for 2 seconds as confirmation, and then the sold red alarm notification will return. This also respects whatever hierarchy I set in the first rule so if I want the garage door open color to show no matter what I could put that first, then only if true would the red alarm notification show after... if neither are true then everything just works like normal.
Anyway, not even sure if passing a color variable like is is exactly what you were asking about @steve.maddigan but figured I would share just in case.