). Value() must
evaluate one of the values "on" or "off". The behavior of devices that do not evaluate one of those values can be corrected by defining a statFormat:
attr stateFormat EDIPlug_01 {(ReadingsVal("EDIPlug_01","state","nF") =~ m/(ON|on)/i) ? "on" : "off" }
if a devices Value() funktion does not evalute to on or off(like WLAN-Steckdose von Edimax) you get the message:
[EDIPlug] result of function Value(EDIPlug_01) must be 'on' or 'off'
switchmode
Setting the switchmode you can influence the behavior of switching on/off.
The parameter has the Format 999/999 and the default ist 800/200. The values are in "per mill".
The first parameter sets the value of the probability that the device will be switched on when the device is off.
The second parameter sets the value of the probability that the device will be switched off when the device is off.
Examples
attr ZufallsTimerZ switchmode 400/400