Using a device Property in the Action of another device???

Basically i would like to under certain conditions use the property of another device that I read into pleg under properties.

The example being if a vitrual switch is on, then I would take the Setpoint of one thermostat and write the current setpoint of another under the logic action

So pMainSetpoint = 22

Condition “tTransfer”

Logic action - Device “Thermostat 2” - Action “SetCurrentSetpoint” - NewCurrentSetpoint “=pMainSetpoint”

Can this be done? whats the syntax if so?
I know it can be done with LUA but would prefer to do it in pleg

Thanks

Of Course it can be done :wink:

You need an input or condition (computed value), we will call it SourceTemp

Then in the action, when you want to set the other thermostat instead of setting the value to something like 70 you would use

{(SourceTemp)}

You can also do things like:

{(SourceTemp + 2)}

Cheers Richard!!!

Just been having a play with it now!

Its going to work a treat and really simplify my heating system up a huge amount

I think I’m going to hold off the full overhaul of the system for a couple of weeks as I’m away tomorrow for two weeks and she’ll kill me if I go away and it doesn’t work lol