Is there a way to intercept remote commands based on time of day/sun position?

I’ve spent the last few months setting up more smart home tech around the house since our son was born. I’m using mainly IKEA hardware (I work right next to the only IKEA in the state) and in the nursery I have:

  • TRADFRI temperature control bulb in a lamp
  • TRADFRI temperature control bulb in the ceiling
  • RODRET remote above the physical existing light switch.

I have an automation which turns on a helper “is son asleep” when his bedtime starts, based on a calendar event, among other things.

Currently we are using the physical switch to turn on and off the ceiling light which sort of defeats the purpose. What I would like to happen is that when the helper is on and I use the remote to switch on the lights, do not turn on the ceiling light, only turn on the lamp. Vice Versa, if the helper is off and the remote is used to turn on lights, turn them all on.

Is this possible? I’ve tried out some blueprints to set up the RODRET, but none are very robust. I have some other remotes which are compatible with Awesome HA Blueprints, but these are no longer being updated and seem to have issued.

Hi, what about using an if/then and that helper in your action?
If the helper is on, switch 1 light on/off with a toggle command (or use the current state to do the opposite) and else to do the same with the other light?

I’ve tried using blueprints so far, I don’t think I can add if/else statements into the blueprint can I? Will I need to make the whole automation from scratch?

I do have conditional actions for remotes in blueprints so this is possible.
The hardest part of building the automation yourself can be to find the right entity to fire it.