toggledbits / Reactor

Reactor (for Vera and openLuup) is a Vera Home Automation plugin that provides advanced programmable logic.
17 stars 0 forks source link

Taking one variable state and applying to another. #25

Closed Tarkus-NJ closed 5 years ago

Tarkus-NJ commented 5 years ago

Hi Patrick

I am looking for instruction on the easiest way to take the input state of my receivers Main Zone input and apply it to Zone 2's input. For example if my Main Zone input is AV1 and Zone2 to was set to AV4 when it was last powered off. When I power on Zone 2 again I would want the input to switch to the same input as the Main Zone in this case AV1. I know I can probably work through this with conditional groups but thought there may be a easier way to store or get the Main Zones input as a variable and apply it Zone 2 when needed.

Thanks John

toggledbits commented 5 years ago

Typically, changing input is done through a device action, so you can:

  1. Get the value of the Main Zone input by using a getstate() to a variable;
  2. Do the device action in your activities, and for the value, you can enter "{variablename}" and Reactor will insert the current value of the variable into the action call.
Tarkus-NJ commented 5 years ago

Thank, got it working.