Automation During Date Range

It would be as it is, but not if you change them.

As it is “n.day <= 31” is always true, and “something and True” is the same as “something”, which is why that clause is not necessary. Same with “n.day >= 1” – it’s always true.

But if you change them, then they won’t always be true, and they won’t be true when you want them to be true.

If you really want to be able to use a range of X.11 - Y.03, then:

  - condition: template
    value_template: >
      {{ n.month == 11 and n.day >= X or n.month > 11
         or n.month == 3 and n.day <= Y or n.month < 3 }}
2 Likes