Conditional Controllers allow the execution of Python 3 code as well as the use of Conditions and Actions that interact with Mycodo. Conditions typically acquire data from Mycodo, such as Input measurements, and Actions typically affect Mycodo, such as actuating an Output or pausing a PID controller. Each Condition and Action you add will have its own description and example code to demonstrate how to use it in your Conditional Statement code. Notes: 1) Timeout must be set longer than it takes your Conditional Statement to execute (if Timeout is set too low, only part of your Conditional Statement may execute), 2) Period must be set longer than the time it takes for your Conditional Statement to execute, otherwise it will execute again before the previous execution has finished. The Conditional Status allows you to provide a return value that can be used by other controllers or dashboard widgets.
{{form_conditional.conditional_statement.label(class_='control-label')}}
{{form_conditional.conditional_status.label(class_='control-label')}}
{{form_conditional.name.label(class_='control-label')}}
{{form_conditional.name(class_='form-control', value=each_function.name, **{'title': dict_translation['name']['phrase']})}}
{{form_conditional.period.label(class_='control-label')}}
{{form_conditional.period(class_='form-control', value=each_function.period, **{'title':_('The duration between checking whether the conditional is true')})}}
{{form_conditional.start_offset.label(class_='control-label')}}
{{form_conditional.start_offset(class_='form-control', value=each_function.start_offset, **{'title':_('The duration (seconds) to wait before the first operation')})}}
{{form_conditional.pyro_timeout.label(class_='control-label')}}
{{form_conditional.pyro_timeout(class_='form-control', value=each_function.pyro_timeout, **{'title':_('The timeout (seconds) for the execution of the Conditional Statement')})}}