Hue module custom control

I’m working on setting up a custom control in my guest bathroom using the existing everyday light switch and a Hue Module. I’m trying to keep it simple for guests so they aren’t even aware they are using a smart device while adding some functionality I want for myself.

The end result has 2 requirements… 1) When the switch flips up, the lights turn on, and when the switch flips down, the lights go off. 2) The first time it flips up, I want the lights to be full bright, then if you flip down, and back up the lights will go to a custom scene.

I have a working setup, with one small annoyance that I just can’t seem to figure out. The setup looks like this…

Press = 1) Bright Scene 2) Bright Scene 3) Custom Scene 4) Custom Scene
(The press is set to reset when idle)

Release = 1) Turn On 2) Turn Off
(This does not reset when idle so that the position of the switch is always up = on and down = off.

So depending on the switch position when you first walk in the lights will either go Off, Bright, Off, Custom Scene (repeat) or they will go Bright, Off, Custom Scene, Off (repeat).

Also I have a motion sensor that turns the lights to ‘Relax’ when first walking in. This is relevant because if you walk in and the switch is up, when you shut the lights off, they quickly flash bright before going off. If the switch starts down, this won’t happen because you flip up and get to the bright scene (which is what I want) and stay there before shutting off again.

It’s a minor annoyance, but I’ve seriously spent hours thinking of how to program this to keep the functionality while losing that one small flash so that guest don’t wonder what happened.

If anyone has any tips, I would love to hear them.

BTW, I’m new to the forum, but I am hugely integrated into the Hue system and love Hue Essentials to customize all the different switches I have! I have 5 different styles Hue Brand and Friends of Hue switches, and Hue Essentials makes it so I can have my fun lights while my family and guests don’t even notice they are using anything different than an average light bulb.