Weather, expressions, global variable and Sonos Speak & resume


#1

Not sure if the bug is there or its me :wink:

I’m attempting to add a report to my morning routine.

Using weather https://wiki.webcore.co/Weather

I want to use my Sonos to speak the following when invoked:

The weather outside is Light Rain, and temperature is around 63.F

using $weather.conditions.current_observation.weather
and $weather.conditions.current_observation.feelslike_string

My plan is to use a global variable and store these values (so i could use them in other pistons if needed)
@Weather_simple
@Weather_like

On setting the global variable i select expression, and enter the string $weather.conditions.current…
The expression is evaluated and the result is displayed.
However on saving the global variable string displays (not set) and on reopening the global variable the expression disappears.

Am I not doing something right?


#2

Can you share your piston?


#3


#4

this is the specific part - although the issue i’m having isn’t forming expressions in a piston, its the global variables.

I’d like to set the global variable to be from an expression (for example:

Variable [string]: @Weather_summary
Expression: $weather.conditions.current_observation.weather " and " $weather.conditions.current_observation.weather.feelslike_f “degrees.”

Which should show:
@Weather_summary = Clear and 71 degrees

but the expressions never seems to save (despite evaluating correctly)


#5

it seems like i need to create a piston to save the local variable to the global variable.
I guess that is because an event is needed to change the state of the global variable (rather than when the expression changing it updating the global variable?)


#6

I created a quick and simple piston that will either run at 6:00am each day or can be run by clicking on the tile:


webCoRE Dashboard 2017-10-05 17-17-43webCoRE Dashboard 2017-10-05 17-15-12


Sump Pump Notification with Weather Component
#7

awesome, thanks
So it seems each day ‘grab’ the weather and store it as a global variable

appreciate the help!