I’m thinking about having different cron patterns depending on profiles.
Like to have different behavior of heating in some rooms or the hot water pump depending on who is in the house.
Can’t detect everybody (young kids, guests, grandma) automatically so the idea is to have buttons for profiles. Than changing the cron depending on the profile. Is there any design pattern around?
Or is setting timers every day at 3am for the whole day depending on the profile active an idea which might work?
Thanks in advance
Look at Design Pattern: Time Of Day
You can put the calculation of the current time of day into that Rule and take into consideration presence or any other piece of information you may care about.
You will have to trigger the rule that calculates the current heating profile (i.e. the time of day profile) any time any of the relevant information occurs. So the start of all your profile times, Astro events, and presence Item changes would all have to trigger the rule.
Keep in mind, the DP shows Time of Day, but that is just an example. You can use the exact same approach to calculate your heating profiles.