[To delete]Now is between month


#1

Hello,

I would like to create a piston to manage a virtual switch (wintering pool)

Here is what I would like to create
If “NOW” is between “April” and September "then switch OFF

But I can not figure out how to achieve this.

I find the functions:

  • Now
  • between

But I can not put just the month, the only thing I have to do is put “between the 01/04/2017 and the 30/09/2017”
But it means that I will have to modify my piston every year

If anyone could help me.

thank you in advance

Edit :
My bad, someone can delete this poste.
I have my answer


#2

$month or $monthname


#3

use timer and you have many options to choose from including which months to run. e.g.:

if you change day to weeks or months you will get other options to select when it should run. just try it out :slight_smile:


#4

Thanks

I have creat like this, this is good?


#5

that should work. it should be triggered every day and turn off during the months selected and turn on during the months not selected.

i was suggesting doing something similar using every statement instead of using the if statement.