Skip to content

Return None for no-telemetry component formulas and bump to 0.6.1 - #50

Merged
shsms merged 2 commits into
frequenz-floss:v0.x.xfrom
shsms:bump-version-0.6.1
Jul 27, 2026
Merged

Return None for no-telemetry component formulas and bump to 0.6.1#50
shsms merged 2 commits into
frequenz-floss:v0.x.xfrom
shsms:bump-version-0.6.1

Conversation

@shsms

@shsms shsms commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

component_formula() returned 0.0 for a component that provides no telemetry, which says its power is zero when the reading is simply missing. This returns None instead, and prepares the v0.6.1 release.

Changes

  • component_formula() returns None for a component that provides no telemetry, matching what component_ac_coalesce_formula() already did. The check reads the operational mode and never the category, so a meter is covered too.
  • Bump the crate version to 0.6.1 and write the release notes for the operational-mode work from Restructure the formula fallback module #43 and Gate no-telemetry components out of formulas via operational mode #44, including the no-telemetry behaviors the notes had left out: a component measured through the meter above it, a silent meter measured through its children, the None a silent grid meter produces, the consumer formula's descent past a silent meter, and the formulas that can come out 0.0 or None.
  • File the component_formula() / component_ac_coalesce_formula() id check under ## Bug Fixes rather than ## Upgrading. Neither signature changed — both already returned Result — and every other formula method already validated its ids through graph.component(id)?.

shsms added 2 commits July 27, 2026 09:32
`component_formula()` returned `0.0` for a component that provides no
telemetry, which says its power is zero. It is not zero: the reading is
missing. Return `None` instead, the same as
`component_ac_coalesce_formula()` already does for that component.

Cover a meter too: the check reads the operational mode and never the
category, so a meter with no telemetry gets `None` like any other
component.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Bump the crate version to 0.6.1 and write the release summary.

Document the no-telemetry behaviors the notes left out: a silent meter
measured through its children, the `None` a silent grid meter produces,
the consumer formula's descent past a silent meter, and the formulas
that can come out `0.0` or `None`. Group them under the one rule they
follow from, rather than listing each as its own feature.

Report the component id check as a bug fix rather than an upgrade note:
`component_formula()` and `component_ac_coalesce_formula()` emitted a
formula for any id, including ids the graph does not have, while every
other formula method already validated its inputs.

Also say that a component, not its operational mode, is what provides
telemetry, matching how the code documents it.

Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
@shsms
shsms merged commit 4b3f047 into frequenz-floss:v0.x.x Jul 27, 2026
3 checks passed
@shsms
shsms deleted the bump-version-0.6.1 branch July 27, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant