camacq.plugins.automations package¶
Handle automations.
- class camacq.plugins.automations.ActionSequence(center: Center, actions: Generator[TemplateAction, None, None] | list[TemplateAction])[source]¶
Bases:
objectRepresent a sequence of actions.
- delay(seconds: float, variables: dict[str, Any], waiting: deque[TemplateAction]) None[source]¶
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: Center, name: str, attach_triggers: Callable[[Callable[[dict[str, Any]], Any]], Callable[[], None] | None], cond_func: Callable[[dict[str, Any]], str | bool], action_sequence: ActionSequence, enabled: bool = True)[source]¶
Bases:
objectAutomation class.
- class camacq.plugins.automations.TemplateAction(center: Center, action_conf: dict[str, Any])[source]¶
Bases:
objectRepresentation of an action with template data.
- camacq.plugins.automations.make_checker(condition_type: str, checks: list[Callable[[dict[str, Any]], str | bool]]) Callable[[dict[str, Any]], bool][source]¶
Return a function to check condition.
- async camacq.plugins.automations.setup_module(center: Center, config: dict[str, Any]) None[source]¶
Set up automations package.
- Parameters:
center (Center instance) – The Center instance.
config (dict) – The config dict.
- camacq.plugins.automations.template_check(value: str | bool) bool[source]¶
Check if a rendered template string equals true.
If value is not a string, return value as is.
Submodules¶
camacq.plugins.automations.event module¶
Handle event trigger in automations.