Skip to content

Add configurable reporting interval and live reporting features - #23

Merged
azebro merged 33 commits into
devfrom
main
Jun 4, 2026
Merged

Add configurable reporting interval and live reporting features#23
azebro merged 33 commits into
devfrom
main

Conversation

@azebro

@azebro azebro commented Jun 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

azebro and others added 30 commits February 23, 2026 18:59
feat: HACS compatibility and v1.0.0 release
- bump version in manifest.json and pytap/__init__.py
- add CHANGELOG.md with v1.1.1 release notes

🚀 - Generated by Copilot
Refactor code structure for improved readability and maintainability
- Add CONF_LIVE_REPORTING boolean (default True) — delivers readings
  as they arrive from the gateway with sub-second latency
- When live reporting is disabled, cache readings and push
  time-weighted averages at the configured write interval
- Replace arithmetic mean with time-weighted average in
  _build_averaged_snapshot() — weights readings by active duration
- Buffer entries now store (monotonic_timestamp, field_dict) tuples
- Config flow: add live_reporting checkbox + conditional interval field
  in the change_reporting options step
- Bump config entry version 4 → 5 with migration (sets live_reporting
  = True for existing entries, preserving current behavior)
- Update strings.json and translations/en.json with new labels
- Rewrite test_write_interval.py with comprehensive coverage:
  time-weighted averaging, buffer population, throttle behaviour,
  live vs interval mode, per-node isolation, None handling
- Update test_config_flow.py for live_reporting + interval options
- Add v4→v5 migration tests
- Fix ruff lint warnings (unused imports, import sorting)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Flush pending averaged updates during idle read cycles
Fix `Validate / Tests (pull_request)` failure caused by coordinator init indentation
@azebro
azebro merged commit 6049be8 into dev Jun 4, 2026
4 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.

3 participants