Properties: logical values and triggering

Howdy,

I have about 8 device properties that are extracted from a multi-virtual-switch. The properties represent the switch states and they are all 0 or 1.

A few questions:

  1. Do changes in the property value trigger a condition to be re-evaluated? Things like normal triggers on devices clearly do, but it wasn’t clear to me if properties are ‘monitored’.

  2. When writing a condition that just references a property, what is being considered if I just reference the property name in the condition? For example, if I have a property called MODE_HOME, what is the difference, if any, in what is being tested for in the condition “MODE_HOME” vs “MODE_HOME != 0”?

  3. Does the ‘repeat?’ flag on a condition do anything when the condition is entirely made up of device properties?

I ran into a looping situation this morning where two conditions kept running back and forth. But the underlying device property wasn’t changing so wasn’t sure why they kept re-evaluating.

Thanks!!

Gerry

Any change to any device property causes all of the conditions to be evaluated.

The meaning of a variable is dependent on it’s context in an an expression.

A variable whose value is 0 taken in a Boolean context so treated as false and true otherwise.

So for Vera variables that us 0 and 1 for values false and true respectively, you can just use the variable name in a Boolean context.