OK WebCore is not for dummies thats for sure
You say to change line 30, line 30 is (do) so im not sure if i should delete 31 to 33 and replace them with
Set variable {cloudy} = (contains(wuCurrent,‘Clear’) ? ‘false’ : ‘true’)
Lines 31 to 33 I dont know what they mean
This is what I did
Piston related to weather
65 degrees & overcast (not cloudy) did what was in the code:
You can go into the piston and see the last data gathered (temp & conditions) at the top of the piston.
(once it runs, it will be in the define section)
I have added back in the important lines of code, and re-posted a fresh version that should do what you want it to.
(I also added a log for you on line 42 so you can see the previous hours as well)
Thank you very much
I see now about the temp
between the two statements its “or” should have been “and”
also i see when I use a backup the line numbers are different
In regards to the statements under location I see now if I click on the first one it will refresh and tell me the temp the second line will tell me the weather condition the third one puts that info (weather condition) into a boolean statement and says if its true or not so that can be looked up by{cloudy} is false
Is that basically it?
In each of the statements below Location you have typed in a line under Expression where does that come from (how do you figure out what to type)
Yup! You will be a pro before you know it!
While editing an Expression, it is helpful to see the output right there as you type… If you want to see what the data was on the previous run, you don’t even have to edit the piston. Just look up top:
This will automatically update every 20 minutes throughout the day…
Also, for a bit more info, you can scroll below the piston to check your log files:
Well, the short answer is, everything in quotes is treated as pure text… Normally, variables are outside the quotes. But all kind of math etc can be done here as well. Algebraic statements work as expected, looking at what is inside the parenthesis first.
For example, the code below is actually a Ternary operator:
(contains(wuCurrent,‘Clear’) ? ‘false’ : ‘true’)
It looks inside the parenthesis first. If wuCurrent contains the word ‘Clear’ then it sets the variable to ‘false’… Otherwise, it is set to ‘true’
You can learn more about advance coding at the following links:
- Expressions (such as: ‘Ternary operators’)
- Functions (such as: ‘contains’)
- Weather (such as ‘$weather.conditions.current_observation.temp_f’)