Childlock - disable Philips Hue dimmer switch with boolean


I’ve got a basic switch at adult height above a child bedroom light switch (Philips Hue Dimmer). I’ve got it set so that an input_boolean switches to ON for 1.5 minutes after I click the basic switch. At night time, I only want the dimmer switch to work if the input_boolean is ON.

Any ideas on how I can get this to work without re-writing the scripts manually for the Philips Hue dimmer? I like the inbuilt functionality of the 1,2,3,4,5th click cycling through different scenes…