Need help converting a rule from 3.0 to 4.0

I had a 3.0 rule that would report the thermostat temperature when a switch was turned on (for asking Alexa the temp).

I created a 4.0 rule in the same way, but instead of reporting the temperature it says "on". Is this a bug or should I report the temperature some other way?

The problem is that %value% is derived from the last trigger event. In this rule the trigger is the switch "Report Temp" so the value would be "ON".

To do what you want I would create a Local Variable and have the thermostat temp stored in it as the first action of the rule, then have your announcement include the %LV% instead of %value%.

1 Like

That makes sense...I thought enclosing the notification inside the thermostat temperature if would change the %value%.

I haven't used global or local variables before...I can't figure out how to create a local variable! Only thing I saw was this, and I don't see a local variable option

Please let me know how to create a local variable, can't find it by searching the forum :grin:

It's in the first page before you define the trigger and actions below the actions section. Just create a LV called "whatever" type decimal

1 Like

Thank you!

1 Like