Skip to content

Develop - #54

Merged
Patrick1610 merged 53 commits into
releasefrom
develop
Mar 10, 2026
Merged

Develop#54
Patrick1610 merged 53 commits into
releasefrom
develop

Conversation

@Patrick1610

Copy link
Copy Markdown
Owner

This pull request introduces several enhancements and bug fixes to the AdaptiveCharge integration, focusing on improved reload stability, live charging overhead calculation, and expert mode diagnostics. The documentation (README.md, MANUAL_TEST_CHECKLIST.md, MIGRATION.md) has been updated to reflect these changes, including expanded feature descriptions, new configuration options, and more detailed entity explanations. The most important changes are grouped below:

Reload Stability & Persistent Storage:

  • Energy counters (Energy Charged sensor) are now restored from persistent storage before the first coordinator tick on reload, preventing brief zero readings and ensuring utility meters do not incorrectly accumulate energy after a reload. The Solar to EV Ratio sensor also restores its last value immediately, avoiding unavailable states. [1] [2] [3] [4] [5]
  • The manual test checklist now includes steps to verify reload stability for energy counters and utility meters.

Live Charging Overhead & Battery Energy Tracking:

  • Charging overhead is now calculated live during a session, blending current session data with lifetime history. This feature activates after at least 0.5 kWh has been charged and uses wall-energy snapshots for stable readings. New sensors for battery energy delta and estimated energy needed to full are documented and mapped. [1] [2] [3] [4] [5]

Expert Mode Diagnostics:

  • Enabling Expert Mode now automatically makes diagnostic sensors (Alignment Diagnostics, Input Skew) visible and enabled. Disabling Expert Mode leaves them enabled, ensuring dashboards are not disrupted. The documentation details these sensors and new controller-tuning parameters. [1] [2] [3] [4] [5]

Charging Priority & Quantization:

  • A new select entity (select.adaptivecharge_charging_priority) allows users to choose between five charging priority modes, affecting how float EMA current is rounded to integer amps. The quantization logic is explained in the documentation, including override hierarchy and effects on charging behavior. [1] [2]

Documentation Improvements & Entity Descriptions:

  • The README.md and MIGRATION.md have been extensively updated with new and clarified features, including entity tables, configuration steps, migration notes, and mapping to Tesla/Tessie entities. Diagnostic and optional sensors are more clearly described, and test coverage is expanded in MANUAL_TEST_CHECKLIST.md. [1] [2] [3] [4] [5] [6]

These changes collectively improve reliability, transparency, and user control over EV charging, especially in scenarios involving integration reloads, advanced diagnostics, and battery-side energy tracking.

Copilot AI and others added 30 commits March 6, 2026 06:05
…tracking

- Add CONF_EV_BATTERY_ENERGY_SENSOR and CONF_EV_ENERGY_ADDED_SENSOR config keys
- Read battery energy remaining and charge energy added sensors in coordinator
- Compute session battery delta (actual kWh received by battery)
- Compute rolling charging overhead % (wall vs battery-received energy)
- Enhance capacity estimation: prefer battery-side kWh delta over SoC%-based
- Add ChargingOverheadSensor and BatteryEnergyDeltaSensor entities
- Expose overhead metrics in EnergyChargedSensor attributes
- Add persistent overhead storage (wall_wh, battery_wh)
- Update config flow and options flow with new optional sensor fields
- Update strings.json and en.json translations

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
- 27 new coordinator tests: overhead, battery delta, capacity with battery sensor
- 5 new storage tests: overhead accumulation, rejection of invalid values
- Update storage test mirror to include overhead_wall_wh/overhead_battery_wh keys
- Total: 601 tests passing (was 569)

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
- Bump manifest.json version from 4.1.1 to 4.1.3
- Remove history.csv from git tracking (already in .gitignore)
- Add data_description for ev_battery_energy_sensor and ev_energy_added_sensor
  in both strings.json and translations/en.json

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
- Include entry.title (instance/device name) in utility meter names
  so sensors get unique names like 'Tesla Energy Charged Daily'
- When utility meters are disabled via options, remove existing ones
  so re-enabling creates fresh sensors with no stale history
- Enhance removal to scan by source entity for robustness across
  HA restarts (tracked IDs are lost from memory on restart)
- Add tests for naming logic and source-based discovery

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…eation

Include instance name in utility meter names and clean up on disable (v4.1.4)
…ities

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…sistence

v4.1.5: Fix reload-induced utility meter spikes, live overhead, expert mode entity enabling
Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…elta-issue

v4.1.6: Fix Battery Energy Delta always Unknown + Solar-to-EV ratio as %
…(v4.2.1)"

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…cted

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
… in expert settings

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…or change

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…p manifest version

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…options

v4.2.2: Charging Priority (5 modes + configurable bias) + overhead sawtooth fix
A1: Net sensor validity gating (net_power_valid flag)
A2: Surplus start requires cable_connected=True (None blocks)
A3: Solar capture factor split from lifetime KPI
A4: Central session finalizer (disconnect, stale, shutdown)
A5: Deduplicate session_battery_delta (compute once per tick)
B6: Storage flush deduplication (in-flight guard)
B8: 38 new edge case tests
Version bump to 4.3.0

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
- Solar-to-EV Ratio documented as lifetime KPI
- Solar Capture Factor documented as operational control metric
- Fail-safe behaviour documented (net invalid, cable unknown)
- Session finalizer documented
- v4.3.0 changelog added
- Backward compatibility and migration notes

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Patrick1610 and others added 23 commits March 7, 2026 15:23
….3.0-for-optimization-ldembg

v4.3.3: add Energy Needed sensor, fix setpoint quantization, sensor continuity, and forecast/control tweaks
…ation cooldown

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…-versions

v4.3.4: Fix import guard restart oscillation — shorter zero-hold + post-escalation cooldown
… session

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…p EV startup oscillation

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…as, remove CONF_PRIORITY_BIAS_W

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…k downward during settling

Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
Co-authored-by: Patrick1610 <6585375+Patrick1610@users.noreply.github.com>
…rovements

v4.3.7 review follow-up: fix 4 unmerged comments + remove dead timestamp state
@Patrick1610
Patrick1610 merged commit c1715d3 into release Mar 10, 2026
2 of 4 checks passed
@Patrick1610
Patrick1610 deleted the develop branch March 10, 2026 11:13
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.

2 participants