New User - Simple on/off via Temp


#1

1) Give a description of the problem
I’ve never written any scripts before so I would like a second look before running this.

2) What is the expected behavior?
I want to set up a rule that if the temperature drops below 33 degrees (sensor) then the smart outlet will turn on (space heater is plugged in). I also want if it reaches above 40 degrees then the outlet turns off.

3) What is happening/not happening?
just want a second look before I start running this.

4) Post a Green Snapshot of the pistonimage


#2

That will work, several alternatives also but yours is fine.


#3

I know there’s a hundred ways to accomplish this, but I’m curious to know how something like this is supposed to be done. Two separate IF statements? Switch cases?


#4

Both those would work… but for just two options neither is any better than the other, so whatever rocks your boat.


#5

I’m now confused on how to make this active? is it just active after i save it or is there another step from there. Sorry first time user…


#6

Just click save and it’s active :smile:

No need to apologise… we were all there once!


#7

Not wishing to steal Robin’s thunder but just for information, if you look at the top of the piston you will see an option to pause pistons. So if for some reason you want stop it from running but don’t want to delete it, you can pause it and it will not run until you resume it.

image


#8

image