Schedy: Conditional subschedule

Hi !

Cannot get this one work correctly. What may be the problem?
week() is defined in environment

schedule:
- v: 20.0
  rules:
  - weekdays: 5
    rules:
    - rules:
      - x: "Next() if week() == 'ODD' else Break()"
      - { start: "07:30", end: "09:00" }
      - { start: "14:30", end: "15:30" }
    - rules:
      - { start: "07:30", end: "09:00" }
      - { start: "14:30", end: "21:30" }
- v: 18.5

Week() is ODD and this should set 18.5 after 15:30 but instead it keeps 20C all the way to 21:30.

Never mind, I figured it out finally myself. Now it’s working as it should :slight_smile:

- weekdays: 5
  rules:
  - rules:
    - x: "Next() if viikkotyyppi() == 'ODD' else Break()"
    - { start: "07:30", end: "09:00" }
    - { start: "14:30", end: "15:30" }
 - { start: "07:30", end: "09:00" }
 - { start: "14:30", end: "21:30" }