bob1de / hass-apps

Some useful apps and snippets to empower Home Assistant and AppDaemon even more.
Apache License 2.0
85 stars 23 forks source link

Unable to skip schedule in case of sub-schedules #59

Open nos86 opened 3 years ago

nos86 commented 3 years ago

Hello, first of all, thank you for your amazing work. I really like this software and the potentiality behind.

I saw that in the following configuration, Schedy is not doing the right stuff:

      schedule:
        - name: Wake-up
          rules:
            - x: "20 if state('sensor.climate_profile') != 'Holiday' else Next()"
              rules:
                - {v: 21, start: "05:30", end: "06:30"}
                - {v: 22, start: "06:30", end: "08:00"}
            - x: "22 if state('sensor.climate_profile') == 'Holiday' else Next()"
              start: "09:00"
              end: "11:00"

I expect that when it's "Holiday" the first rule (and it's sub-rules) is skipped. Instead it is processed and the temperature is assigned. The problem can be solved if I decide to avoid to write sub-rules and I repeat the rule twice: but I love the DRY approach.

Have you seen this problem? I'm doing wrongly something?

thanks in advance, Salvo