I am curious as to how the XX ? YY : ZZ works and would be used in a real world example. Where would I use this expression? In a condition? If in a condition will this provide a variable(trigger) to use in another condition? Any help would be appreciated, Thanks.
Say you are controlling the heating in a room (Water cooled with a Z-Wave controlled thermostat in each room)
This is a room you do not use often.
RoomSetpoint (RoomMotion; NOW < 2:00:00) ? 70 : 60
Then in the Action for RoomSetpoint you would send the value to the Thermostat.
is there an option in the advanced menu called sendvalue?
See the docs:
http://rts-services.com/Vera/Plugin/PLC/#Operation
What I really don’t get is how to use these values in an Action. I also can’t find this in the documentation. Therfore I think it would be nice if we could work out another example:
Target:
If a Motion sensor is tripped, and it is in between 10:00 and 12:00 o’clock, dim the light to 100%, else dim it to 50%.
Condition:
(MotionTripped == 1) AND (10:00:00;NOW;12:00:00) ? 100 : 50
Action:
???
[quote=“chixxi, post:5, topic:176997”]What I really don’t get is how to use these values in an Action. I also can’t find this in the documentation. Therfore I think it would be nice if we could work out another example:
Target:
If a Motion sensor is tripped, and it is in between 10:00 and 12:00 o’clock, dim the light to 100%, else dim it to 50%.
Condition:
(MotionTripped == 1) AND (10:00:00;NOW;12:00:00) ? 100 : 50
Action:
???[/quote]
Condition:
_NewLevel (MotionTripped == 1) AND (10:00:00;NOW;12:00:00) ? 100 : 50
Action for _NewLevel
SetLoadLevelTarget newLoadLoadlevelTarget = {(_NewLevel)}
The underscore on the condition name is important so that the condition will fire whenever it changes value rather than only when it becomes true.
@RexBeckett: Now I got it! Thank you very much for this, for some reason I was not able to work this out myself from the documentation.
No problem. Note that I only attempted to answer the question about the form of the action. You may want to rethink the condition expression before using it in anger. The use of the NOW term is probably going to get your dim level set onc per minute. I would split the condition into two to prevent this:
Level100 (MotionTripped == 1) AND (10:00:00;NOW;12:00:00)
_NewLevel (Level100) ? 100 : 50
Thanks, it wa about the actions where didn’t get it how to transfer the value.
But still a vera good hint with the condition in general.