Setting TRVs based on state of multiple sensors

I have multiple thermostatic radiator valves located in multiple rooms in the house. I’m trying to figure out the best logic to set their temperature based on who is in the house and the time of the day. Intention is to only heat the rooms that are occupied during the day. i.e. if kids are at school, but i’m working at home then turn of all rooms except the study, but as soon as kids are back from school then turn on etc.

Orignally went down the path of using multiple automoations, but became quiet complex because of actions that caused TRVs from one automation conflicting with another.

Is there a good way of implementing this based on multple input states (e.g… kids at school AND working from home), then set temnperature of selected TRVs to X ?