I have a command that turns on power to the blinds at 05:55, so my wife, who gets up early, can lower halfway down the one in the window she's sitting by (there are several) and not be blinded by the low sun. But it's only necessary from mid May to mid September here in Norway. How can I stop mesages if the date is from the 16th of September and to the 14th of May, but let them go through if it's from the 15th of May and to the 15th of September? I have a sneaking suspicion that the answer may be a Function node. I have one with this code:
msg.payload = {
relay:0,
on:true
};
return msg;
That's the code to turn on the Shelly switch, which turns on the power to the blinds. I think I should use an if-then there, so the payload is set to something else (which then won't trigger the Shelly) if between 16th of September and 14th of May, but I'm not sure what that should be.