Skip to content

Create plugin automation types from the automations page - #2871

Open
BelhsanHmida wants to merge 3 commits into
mainfrom
feat/plugin-automation-creation-form
Open

BelhsanHmida wants to merge 3 commits into
mainfrom
feat/plugin-automation-creation-form

Conversation

@BelhsanHmida

@BelhsanHmida BelhsanHmida commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Plugins can add automation types (#2530), but the New automation form only offered forecasting, scheduling and reporting, so a plugin automation had to be created with the CLI or the API.

This PR lets the form create them. For example, with the EMS plugin installed, New automation → Type → Plugin types → meent-p1-pull takes the config (meter-asset, pod-url, …) and parameters as JSON, and Create gives the same automation as flexmeasures add automation --type meent-p1-pull.

  • The Type list shows each installed plugin type under Plugin types, by the name its tab uses. A type whose plugin is no longer installed keeps its tab but is not offered.
  • For a plugin type, the Data generator field is hidden, since the plugin declares its generator. The config, parameters and data source fields stay.
  • The data source picker lists sources of the plugin generator's type, e.g. ingestor, as it does forecaster for forecasts and reporter for reports.
  • The run period hint (start-offset, duration) is only shown for the built-in types: plugin parameters follow the plugin's own schema.
  • Copy on a plugin automation now fills in its type and data source. Before, the type list had no option for it, so the copy came out without a type.
  • The empty tab of a plugin type now points to the New automation button too, not only to the CLI.
  • Docs: the plugin automations section says how to create one from the form, instead of "creation forms are a follow-up".

No API or plugin changes: the form posts to POST /api/v3_0/assets/(id)/automations, which already accepts plugin types.

How to test

pytest flexmeasures/ui/tests/test_asset_crud.py -k plugin_types
pytest flexmeasures/ui/tests/js/test_automation_copy.py flexmeasures/ui/tests/js/test_automation_source_picker.py

Or by hand: with a plugin that registers an automation type, open an asset's Automations page, choose New automation, pick the type under Plugin types, fill in its config and parameters, and create it. Then choose Copy on it: the form opens with the type and data source filled in.

Further improvements

Related Items

Follow-up to #2530.
closes #2873


Sign-off

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

The creation form offered only the built-in types, so plugin types could only be created with the CLI or API.
It now lists each installed plugin type under Plugin types, hides the data generator class field for them,
and narrows the data source picker to the sources their generator records under.
A Copy of a plugin automation now keeps its type and data source too.

Signed-off-by: Mohamed Belhsan Hmida <[email protected]>
@read-the-docs-community

read-the-docs-community Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 flexmeasures | 🛠️ Build #35914015 | 📁 Comparing 41323f1 against latest (0321d69)

  🔍 Preview build  

6 files changed · ± 6 modified

± Modified

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create plugin automation types from the New automation form

1 participant