Date "is not" X


#1

1) Give a description of the problem
I’m in the process of moving all my pistons from CoRE to webCoRE. I have a piston that turns the lights on the front of the house on each night 30 mins prior to Sunset. I want this to run every night except Oct 31st. (I forget to turn it off and kids come to the door when I’m typically not home).

In CoRE there were restrictions so I had “Only execute when variable matches $currentEventDate is not equal to October 31” When writing in webCoRE I don’t see the option for “Is not equal to”.

Im sure this can be done… I’m just not able to figure it out.

2) What is the expected behavior?
Piston runs everyday except Oct 31 of every year.

3) What is happening/not happening?
I can add the date but it always requires a year. I don’t want to have to go and adjust it each year.

4) Post a Green Snapshot of the piston!


#2

You could put a restriction in.
ONLY WHEN
Date is not 31st October.
EDIT:
Oops cannot do that.
Probably use an expression.
I have this for my Christmas switch.
Could probably amend this to work.

image

Use dates Jan 1st to Oct 30th
OR
Nov 1st to Dec 31st.


#3

I thought that too but ‘Is Not’ is not an available option with date. And, you have to specify a year which would mean the piston would have to be updated every year even if ‘Is Not’ was possible.


#4

Amended my reply above.


#5

I haven’t used an expression yet… do you think this would work?


#6

The above won’t work because Date in webCoRE needs a year. I verified the following works (positive and negative) using today’s date.

I created the restriction using an expression:


#7

Try this.


#8

thanks everyone! Ill try these out!