@blitzkneisser I’d recommend creating a schedule snippet for the vacation schedule and include it like so:
- x: IncludeSchedule(schedule_snippets["vacation"]) if is_on(...) else Skip()
Or, directly in a sub-schedule:
- rules:
- x: Break() if not is_on(...) else Skip()
# and here all your vacation rules, even with nested sub-schedules if desired,
# but of course the is_on(...) guard is not needed anymore
EDIT: Your example would of course work as well, but you have a lot of redundant checks for the vacation switch, which could make reading and maintaining it difficult.
Cool! It’s just that errors are sometimes easier to spot when the schedules are structured in a reasonable way. You may also observe the schedule evaluation with debug logging enabled. That shows you exactly which rule of which sub-schedule is evaluated why and to what result.
@roschi, just wanted to applause and say thank you very much for this app.
Just tried to use a schedule_snippet with the add feature and it works like a charm.
I’ve just got a small present for you: Schedy version 0.2.0. On board are some small refinements (especially in documentation) and the new and improved result postprocessors (such as the well-known Add()).
Enjoy the holidays with your loved ones and Schedy
Best Christmas present ever (don’t tell my Wife )
Have been working wit Schedy all day long adding short, long away schedules and of course the holiday mode. All works as expected. Controlling the boiler switch with the statistic max value for all rooms and this also works. Nothing to complain about learning cycle is easier as initially expected, as with everything it helps to just do it
@taste Sounds great! Yes, I’m continuously thinking about how to make the learning curve less steep, but that’s not so easy to acomplish with all the power provided by the more advanced features like result markers, postprocessors or maybe even sub-schedules.
If you’ve got any ideas about that from a user’s perspective, don’t hesitate letting me know. I by nature see the whole thing from the perspective of the one who designed and developed it and might miss some necessities.
I think the best way to demonstrate is examples. Some of the snippets in the documentation are too small and lose the context or else it is difficult to see how they all fit together.
@baz123 Could you maybe make a list of the snippets you think that applies to?
What I definitely want to avoid is people just copying things without reading and understanding how they work. And I try to avoid redundancy whereever feasible to make maintaining the docs less of an effort.
Yeah, I’m thinking the same way. I’m able to schedule my thermostats so that it works mostly like I want but I would love to see more complex examples to see what other people are doing to get new ideas
@dnuc What I could imagine to have is a kind of area where people can hand in their configs (or better just the parts of them they feel could help others). I could then maybe review those snippets and link to them from the documentation.
Or maybe even an open area where people can just submit their configs and I just link to them without comments?
There is a risk of that, but without seeing some complex examples it is sometime difficult to understand what is possible. It is also pretty difficult to just copy and use these sorts of examples.
Will try at some point. TBH I have not gone through it since you have updated the documentation so this may be old news
@baz123 Yes, quite a lot has changed in the docs over the last weeks. I really tried to make things less obscure and better structured.
We could even collect more examples under the Tips & Tricks chapter, at least that’s what it’s intended for.
EDIT: The problem I see with having lots of examples is keeping them in sync with ongoing changes of the API. Schedy’s API can’t be considered stable yet and while I mention deprecated things in the Changelog before removing or changing them in a backwards-incompatible way, somebody will have to maintain the examples.
Indeed, I see your idea of the risk of copying examples without thinking but it does help a lot to help you to jump start. You could have an example with different schedules for working day’s Saturday and Sunday. Alternative schedules when the house is empty and during the holidays.
Once I know mine all work correctly I could give some examples if you like @roschi
I also use Schedy to backup my configuration to Gdrive twice a month which is also very convenient! Can share these examples too.
@taste Good idea, although presence and holidays could be detected and implemented in quite different ways.
Your config is really appreciated when you consider it ready. Especially the backup thing sounds interesting as I can’t imagine how you might have done it