camacq.plugins.automations package¶
Handle automations.
-
class
camacq.plugins.automations.
ActionSequence
(center, actions)¶ Bases:
object
Represent a sequence of actions.
-
delay
(seconds, variables, waiting)¶ Delay action sequence.
- Parameters
seconds (float) – A time interval to delay the pending action sequence.
variables (dict) – A dict of template variables.
-
-
class
camacq.plugins.automations.
Automation
(center, name, attach_triggers, cond_func, action_sequence, enabled=True)¶ Bases:
object
Automation class.
-
disable
()¶ Disable automation.
-
enable
()¶ Enable automation.
-
async
trigger
(variables)¶ Run actions of this automation.
-
-
class
camacq.plugins.automations.
TemplateAction
(center, action_conf)¶ Bases:
object
Representation of an action with template data.
-
render
(variables)¶ Render the template with the kwargs for the action.
-
-
camacq.plugins.automations.
make_checker
(condition_type, checks)¶ Return a function to check condition.
-
async
camacq.plugins.automations.
setup_module
(center, config)¶ Set up automations package.
- Parameters
center (Center instance) – The Center instance.
config (dict) – The config dict.
-
camacq.plugins.automations.
template_check
(value)¶ Check if a rendered template string equals true.
If value is not a string, return value as is.