If have coded the following condition with an "on-false" action. The problem is, that even if the conditions are validated as false the on-false actions are not executed. Is there a bug?
Thank you!
Luigi
The problem is probably that the "on-true" and "on-false" action lists are only executed when the condition result changes from true to false and from false to true. At program startup, the variable containing the actual condition value is set to false, then if the condition is evaluated as false, the rule doesn't see a change and the on-false actions are not executed.
I'm currently working on an improvement for the action-lists (for release 0.0.1.27). This improvement will allow to set type="if-false" instead of "on-false" and the same with "if-true". In that case, the corresponding action-list will be executed every time the condition is evaluated.
Regards,
Jean-François
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If have coded the following condition with an "on-false" action. The problem is, that even if the conditions are validated as false the on-false actions are not executed. Is there a bug?
Thank you!
Luigi
<rule id="Rasenbewaesserung">
<condition type="and">
<condition type="object" id="Rasenbewaesserung" value="on" trigger="true" />
<condition type="object" id="Regen" value="off" />
<condition type="object" id="Feuchtigkeitssensor" value="off" />
</condition>
<actionlist>
<action type="set-value" id="Rasenbewaesserung" value="on" />
<action type="set-value" id="Rasenbewaesserung" value="off" delay="910" />
</actionlist>
<actionlist type="on-false">
<action type="set-value" id="Rasenbewaesserung" value="off" />
</actionlist>
</rule>
Hi,
The problem is probably that the "on-true" and "on-false" action lists are only executed when the condition result changes from true to false and from false to true. At program startup, the variable containing the actual condition value is set to false, then if the condition is evaluated as false, the rule doesn't see a change and the on-false actions are not executed.
I'm currently working on an improvement for the action-lists (for release 0.0.1.27). This improvement will allow to set type="if-false" instead of "on-false" and the same with "if-true". In that case, the corresponding action-list will be executed every time the condition is evaluated.
Regards,
Jean-François