Menu

<actionlist type="on-false"> not working

Help
Luigi01
2009-07-10
2012-12-14
  • Luigi01

    Luigi01 - 2009-07-10

    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>

     
    • jef2000

      jef2000 - 2009-07-20

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.