Skip to content

Add data fetching wrapper#305

Open
Mohammad-Tayyab-Frequenz wants to merge 2 commits into
frequenz-floss:v0.x.xfrom
Mohammad-Tayyab-Frequenz:add-data-fetching-wrapper
Open

Add data fetching wrapper#305
Mohammad-Tayyab-Frequenz wants to merge 2 commits into
frequenz-floss:v0.x.xfrom
Mohammad-Tayyab-Frequenz:add-data-fetching-wrapper

Conversation

@Mohammad-Tayyab-Frequenz

@Mohammad-Tayyab-Frequenz Mohammad-Tayyab-Frequenz commented May 8, 2026

Copy link
Copy Markdown
Contributor

The metric_data function has been extended from a direct power-only fetcher into a more flexible entry point that can now work in two modes: fetching active power directly or deriving power from cumulative energy data. With the new data_fetch_mode parameter, we can either keep the existing AC_POWER_ACTIVE path or fetch AC_ENERGY_ACTIVE_CONSUMED and AC_ENERGY_ACTIVE_DELIVERED in parallel.

The original functionality of metric_data is shifted to _fetch_metric_data function now.

@Mohammad-Tayyab-Frequenz Mohammad-Tayyab-Frequenz requested a review from a team as a code owner May 8, 2026 17:23
@github-actions github-actions Bot added the part:docs Affects the documentation label May 8, 2026
Comment thread src/frequenz/data/microgrid/component_data.py Outdated
Comment thread src/frequenz/data/microgrid/component_data.py Outdated
Comment thread src/frequenz/data/microgrid/component_data.py Outdated
Comment thread src/frequenz/data/microgrid/component_data.py
@Mohammad-Tayyab-Frequenz Mohammad-Tayyab-Frequenz force-pushed the add-data-fetching-wrapper branch 2 times, most recently from cad7ae1 to 8ebeeeb Compare May 21, 2026 19:28
@Mohammad-Tayyab-Frequenz

Copy link
Copy Markdown
Contributor Author

@cwasicki Can you please have a look at this PR again?
Thank you!

@Mohammad-Tayyab-Frequenz Mohammad-Tayyab-Frequenz force-pushed the add-data-fetching-wrapper branch 2 times, most recently from c7d2f46 to f4cbd38 Compare July 2, 2026 14:36
Signed-off-by: Mohammad Tayyab <Mohammad.Tayyab@neustrom.de>
Signed-off-by: Mohammad Tayyab <Mohammad.Tayyab@neustrom.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants