Binary sensor between two dates

Hi,

last year, i wanted to have a binary sensor that gives back “true” when the date is between november 24th and february 1st. So i added this in the configuration.yaml and it worked as expected:

    - name: "Weihnachten"
      unique_id: is_xmas
      state: >
        {{ not (now().month, now().day) >= (2,1) and (now().month, now().day) <= (11,24) }}

I used this binary sensor as condition for my christmas lights automation.
But now, it doesn’t work anymore. The binary sensor always gives back “false” state.
Any idea?

Thnaks

StefanV3

{{ not ((2,1) <= (now().month, now().day) <= (11,24)) }}

Thanks…now working again…