Skip to content

fix: prevent duplicate Zap battery readings#642

Merged
frahlg merged 1 commit into
masterfrom
agent/zap-battery-dedup-ui
Jul 22, 2026
Merged

fix: prevent duplicate Zap battery readings#642
frahlg merged 1 commit into
masterfrom
agent/zap-battery-dedup-ui

Conversation

@frahlg

@frahlg frahlg commented Jul 22, 2026

Copy link
Copy Markdown
Member

What changed

  • Add a Disable battery readings control for multi-resource HTTP gateways such as Sourceful Zap.
  • Show it only when the signed catalog says the driver reports both the site meter and a battery.
  • Keep Zap battery reporting enabled by default for sites that use Zap as their only battery source.

Why

Zap already supports config.disable_battery, but Settings did not expose it. A site with both a native battery driver and Zap could therefore report the same physical battery twice. Combined then added both readings.

Test plan

  • node --test web/setup.test.mjs
  • npm test
  • go test ./internal/drivers -run TestZapDisableFlagsAvoidDuplicateNativeDrivers -count=1
  • make verify
  • pre-push make verify-all

@frahlg
frahlg marked this pull request as ready for review July 22, 2026 14:58
@frahlg
frahlg merged commit c563cb5 into master Jul 22, 2026
11 checks passed
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