Setting one device equal to another in rules

My apologies for this very noob question and I did search without luck. I want to capture a device temperature once per hour but can’t figure out how to set the virtual device “Hourly Temp” equal to the actual temperature. The hourly part is easy but just can’t figure out how to make hourly temp = outside temp when triggered. I’m sure it’s so easy. Any help appreciated.

Create the hourly triggers then in the flow section add action > set $hourlyTemp using device > device attribute > [device name] > temp

Thanks Terri. So that would mean that I need to set up a variable, copy the Out Side Temp to the variable and then copy the variable to the virtual device Hourly Temp, correct? So that explains why I couldn’t copy directly from Out Side Temp device to the virtual Hourly Temp device.

What is the virtual device that youre using?

Its a vEdge virtual device for temperature called Hourly Temp. The goal is simply: on the hour, set Hourly Temp equal to Outside Temp. Appreciate your patience.

I’m not sure what options there are for the vEdge temp devices as far as applying settings it goes. Maybe someone who is using that device will chime in and have some thoughts on a more direct way. If I have time later today Ill try to install one and see if I can come up with something better. Which driver are you using?

I’m not using that driver either, however another option would be to query the OpenWeatherMap API each hour and set your variable to the context variable for the current temp: $context.response.data.current.temp.

Not the same path to get you there, but another option of setting a variable to the current temp each hour.

You can see how to get the API here: Rules and Expressions with Open Weather API.

1 Like

Hey Terri, thanks again. The TAustin vEdge driver is [ST Edge] vEdge Creator: a virtual device generator for end users - Community Created Device Types - SmartThings Community - channel link included on page. I’ve been using the MQTT and WebRequestor drivers with great success. I started using vEdge when legacy momentary buttons stopped working, not sure if that was related to groovy demise.

I just installed and played with it a bit and it looks like setting a variable to the outside temp and then setting the virtual device to the variable is the easiet, possibly only, way. Unless you want to go the route @Jason_K_Jennings suggested.

1 Like

Thanks guys for all your assistance. I ended up doing it through Rules API. Once again, thanks for the help, appreciate it.