Page 1 of 1

Rule monthly action

Posted: 18 Nov 2018, 00:20
by reddo
Trying to get my Sonoff to switch something on once a month for a day but will this work ?? Idea is the first of the month it's on for the entire day, the rest of the month it's not.

on %sysmonth%=1 do
gpio 12,1
endon

on %systmonth%!=1 do
gpio 12,0
endon

thanks !

Edit :

seems to work with the following (stupid me, shouldve used sysday of course, besides some code changing :evil: )

on Clock#Time do
if %sysday%=18
gpio 12,1
endif
endon

on Clock#Time do
if %sysday%!=18
gpio 12,0
endif
endon