Glad to hear that it answered your question. Please consider marking my post (above) with the Solution tag. It will automatically place a check-mark next to the topic’s title which indicates to other users that this topic has an accepted Solution. It will also automatically place a link beneath your first post that leads to the Solution topic. All of this helps other users find answers to similar questions.
Over a year has passed since the last post was written and there are now new ways of achieving the result that are more efficient (using either match or search).
The point of my post was that you exhumed a thread that’s been dead for over a year to recommend users employ an outdated technique:
For anyone else looking to enable and disable schedules in bulk:
To learn about Jinja2 templating in Home Assistant, its best to start with the official documentation’s section on Templating. That section contains links to other important references including the official documentation for the Jinja2 templating language. The important thing to keep in mind is that Home Assistant doesn’t support everything described in Jinja2’s documentation and Home Assistant has its own extensions to Jinja2.