Help with sunrise offset, and review please


#23

I think I get it. Thanks for all your time! I’ve got so much to learn!

EDIT: LOL I’ve reached the maximum number of responses I can do on my first day - can’t post anymore! :slight_smile:


#24

I get what you are asking now.
This post will answer better…

When you ran a code in a computer enviroment, it reads every single line, and does what it’s told to do.
In a Smart home enviroment things are different.
Webcore sends a signal to your hub and your hub sends it to that specific device.
And webcore works like a rain drop from top to buttom AND DROPS, it has no way of controlling if LINE 35 is properly executed. It only sends the signal (unless you write a complex code with fail safes)

Lets say you said, hey webcore turn my lights ON…
Webcore sends that to ST HUB, ST hub sends that to your smart light bulb.
but no one truly knows if that bulb is really on now. (unless you are checking it with other pistons etc)

ps : I’m not and advance user so this is just my limited knowledge.


#25
  • {$day} is a system variable. It updates itself automatically
  • {day} is a local variable I created. It only updates when the code tells it to

On the first run, {day} is empty, so it is different than {$day}, and the code executes. The very last line stores the day of the month (currently 12) into the local variable. If it tries to run again on the same day, the check will fail, and the block will not execute. Once a new day begins, the system variable {$day} will be different, so the check will pass once.


Line 17 = Options > Show Variables… Then Add a new variable in the define section
Line 26 = Add a new condition
Line 42 = Add a new statement > Location > Set variable


#26

Just wanted to say thanks for the help - it worked perfectly!


#27

Glad to be able to help…