New to WebCoRE - I’ve found my question in the community BB and the OP posted as solved but no solution shared. I’m sure it’s variable types problem.
So… I’ve DL’d a good piston to control outdoor lights using motion detector
I want to replace some of the ‘hard coded’ values with variables - eg,
lights on at sunset
to
lights on at sunset +/- an offset, which is defined as a Local Variable
Original Code:
every day, at sunset do
_ withLights-Driveway do_
_ Fade level to 100% in 45 seconds;_
_ end with;_
end every;
So… I defined a variable sunsetOffset at the beginning of the script:
defineinteger sunsetOffset = 10;
end define;
And I would like to edit that
_every day, at sunset do_
to
_every day, at sunset - [sunsetOffset] do_
But when I edit the EVERY…
every… VALUE (1) [days]
at this time… PRESET (Sunset)
with this offset… (VALUE/EXPRESSION) - !! There is no option to select the variable sunsetOffset !!
I think its cuz I don’t have the correct VAR TYPE assigned to the variable sunsetOffset
I’ve tried setting the type to time cuz an offset is a number of minutes - but no success.
thanks in advance - such a fundamental question