I’ve got a motion sensor for my bedroom and currently have a rule set up that basically:
When triggered between sunset-sunrise, and “ready for bed” is false, turn on the light and set “ready for bed” true. Then I’ll get to bed and read a bit and then eventually turn off light.
At sunrise turn “ready for bed” false.
All works just fine. The “problem” now that sunset is far earlier than bed time - I still want the lights to turn on because it’s dark but I don’t want them to stay on. Is there a super easy/straightforward way to add this constraint in?
My first thought was to adjust the rule to NOT between sunset but maybe after 9pm, and then a separate room lighting app that triggers between sunset and 9pm…
If you want a purely automated solution, similar to your initial description, then I may leave that for you to discuss with others.... But for my setup, because I don't have a predictable bedtime or routine (I probably should, but don't), it makes it hard to come up with any one time or trigger for things like what you are looking for. In the end I have setup various physical buttons around the house that allow me to manually control transitioning between modes, which I use to control the scenes used when activating my lighting in each room. You may want to at least introduce something similar, if only for this one situation, and most likely without introducing modes, but just to adjust your ready for bed variable / switch.
In terms of the buttons I described, I have one Samsung button magnetised to the side of my fridge where I have a few other controls and a tablet mounted. This button is seen as controlling the whole house all the time, so a single press will move the house between modes based on a sequence I defined, Day -> Evening (I think) -> Night -> Day -> etc. A long-press will put the house into a Relax mode. In other rooms I have 4-button Hue Tap dials, where a single press of each button adjusts the lighting in that room to be each mode-based scene, without changing the mode. A long-press adjusts the house to the equivalent mode, Day, Evening, Relax or Night. I do also have a Samsung button magetised to my bed-head, which on a single-press controls whether motion-lighting is enabled in the bedroom, but on a long-press adjusts the mode for the whol-house.
You may want to look at something similar to any one of these options, potentially with a button in your bedroom to provide that manual control I was talking about, allowing you to enter the room throughout the evening, manually adjust to the ready for bed state when you want. Whether you want to transition to this before entering the room, I'm not sure, but a button in the living area may also be worth considering, up to you.
My first thought is to set up the motion rules in Room Lighting. Then, I would add a limit to activation of the Ready for Bed switch. This way the motion lighting always works unless you are getting ready for bed.
Then, I would use Room Lighting or Rule Machine to control the Ready for Bed switch. You could set the switch to come on later of two times (sunset or 9pm) and turn off at sunrise.