To elaborate, the Event State Node for TV Off fires when the state is OFF (Halt if ON). The Time Range node passes the message if the time is after 22:00. It triggers both the Stoptimer node (for 10 minutes) and the Traffic Light (to ALLOW for the OFF regex and STOP for the STOP regex). The Stop Timer passes a 2nd payload of STOP to the traffic light after 10 minutes. Hallway motion fires when ON (Halt if OFF). When the traffic light is green, it passes that payload on to the Change Node that converts the payload to OFF (I’m not 100% sure this is necessary but I’ve had flows do the opposite of what I expected before implementing this) and on to the call service node to turn off the lights.
It may be that the time range node doesn’t allow you to cross midnight. In which case, two time range nodes (one 22:00-23:59 and one 00:00-whenever you want to stop) should work.