Lights based on weather conditions


#1

I’m trying to get something to happen based on weather conditions. I want the light to come on early if it’s cloudy or raining. But this piston is never running the bottom if statement. What am I missing?

Thanks!


#2

Your piston does not appear to have posted correctly. It’s not viewable, at least via Firefox.


#3

Sorry about that and thanks for the heads up


#4

You don’t have your last IF statement subscribed to anything to make it trigger/run. Try clicking on that “IF whichone” statement, then on the right of your screen change Subscribe from Auto to Always and it should trigger whenever “whichone” changes.


#5

Here’s a piston I use to accomplish what you’re looking for. If it’s clear/sunny, then the lights come on at 30 mins before sunset. If it’s rain/snow/overcast, then the lights come on at 90 mins before sunset.

Been using it for awhile, works well.


#6

You don’t have your last IF statement subscribed to anything to make it trigger/run. Try clicking on that “IF whichone” statement, then on the right of your screen change Subscribe from Auto to Always and it should trigger whenever “whichone” changes

This didn’t work!


#7

Try posting your updated piston and updated logs for more help…

Edit: you also set your “whichone” variable to zero before every piston run, so your last IF statement will NEVER evaluate true.