All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Maximum charging current cap raised from 32A to 63A - The artificial cap of 32A in the config flow validation has been raised to 63A (Type 2 connector practical maximum for single-phase). The default remains 32A, but users with hardware/installations that support higher currents (single-phase up to ~14kW, 3-phase up to ~43kW) can now configure values above 32A via Options. The wallbox will reject via OCPP
SetChargingProfileif the value exceeds its hardware capability.
- Charging Current Limit slider not respecting Options changes - The slider's maximum value and current value were read only from
entry.data, ignoringentry.options. After updating the maximum current in Settings → Configure, the slider now correctly reflects the new ceiling on reload.
- RFID token and max current in Options flow - Users can now verify and edit the RFID token and maximum current after initial setup via Settings → Devices & Services → Configure, without needing to remove and re-add the integration (#10)
- Transaction state recovery on connect - After HA restart, the integration now triggers a
TransactionEventfrom the wallbox to recover the active transaction ID and ID token, fixing Start/Stop buttons failing until a new charging event arrived - RFID token logging at startup - Configured RFID token is now logged (masked) at server startup for easier debugging
- Energy Session sensor - Removed redundant sensor that always matched Energy Total
- Migration error on upgrade - Added missing
async_migrate_entryhandler for existing installations upgrading from v1.5.x - Options flow crash - Fixed
OptionsFlowconstructor conflicting with HA's built-inconfig_entryproperty
- Active meter polling during charging - Integration now proactively requests fresh meter values from the wallbox during active charging sessions via OCPP
TriggerMessage, instead of relying solely on push-basedTransactionEventmessages. This fixes sensors not updating on wallboxes that don't includemeter_valuein TransactionEvent (#7) - Configurable polling interval - New "Meter Polling Interval" option (5–60 seconds, default 10s) available during setup and in integration options for post-setup adjustment
- Options flow - Users can now change the polling interval after initial setup via the integration's "Configure" button
- Sensors not updating during active charging - Some wallboxes send
TransactionEventwithout meter data, causing power, energy, current, and voltage sensors to remain stale until integration restart - Stop/Pause command failing on stale data - The pause command would skip sending
SetChargingProfile(0A)when power showed 0W due to stale data. Now refreshes meter values before checking, and also verifies charging state
- NotifyEvent Handler - Added handler for OCPP 2.0.1 NotifyEvent messages
- Prevents
NotImplementedErrorspam in Home Assistant logs - Some wallboxes send this message frequently; now handled gracefully
- Thanks to @eaglerbits for the contribution! (#4)
- Prevents
- Release Notes - Fixed "What's New" header not showing version number in GitHub releases
- Home Assistant Brands integration - Icons now served from official Home Assistant Brands repository
- Added
brandfield tomanifest.jsonto reference Brands CDN - Icons available at
https://brands.home-assistant.io/_/bmw_wallbox/ - Removed local icon files (icon.png, icon@2x.png, logo.png)
- Integration now displays official BMW Wallbox branding across all Home Assistant interfaces
- Added
- Integration icons now load from Home Assistant Brands CDN instead of local files
- Improved consistency with other Home Assistant integrations
Problem: When the wallbox rejected a pause/stop command, charging continued indefinitely with no fallback. This caused massive electricity costs when tariff changed from off-peak to peak.
Solution: Added automatic wallbox reboot as failsafe when pause/stop commands fail.
- CRITICAL: Stop charging now has failsafe reboot - If
SetChargingProfile(0A)is rejected, times out, or throws an exception, the wallbox is automatically rebooted to force stop charging- Matches the existing failsafe behavior in
async_start_charging() - Logs with 💣 emoji for visibility:
💣 NUKE OPTION: Pause rejected, rebooting wallbox to force stop!
- Matches the existing failsafe behavior in
async_pause_charging()now acceptsallow_nuke: bool = Trueparameterasync_stop_charging()now acceptsallow_nuke: bool = Trueparameter- Both methods now return an
actionfield in the result dict (paused,nuked,nuke_failed, etc.)
- Added 4 new tests for pause/stop NUKE failsafe behavior:
test_async_pause_charging_nuke_on_rejectiontest_async_pause_charging_no_nuke_when_disabledtest_async_pause_charging_nuke_on_timeout
- All 96 tests pass
Added a slider control to adjust the charging current limit (6A to max_current).
- Current Limit Slider - New number entity to set charging current (6A - 32A)
- Works as a slider in the Home Assistant UI
- When changed during active charging: immediately updates the wallbox
- When changed while not charging: saves for next start/resume
- Defaults to
max_currentfrom your integration config
- Bug: Forced 32A on Start - Previously, starting or resuming charging always forced 32A regardless of user preference
- Now uses the value from the Current Limit slider
- Respects your configured
max_currentsetting
async_start_charging()now uses trackedcurrent_limitinstead of hardcoded 32Aasync_resume_charging()now uses trackedcurrent_limitas default (instead of 32.0)async_set_current_limit()now stores the accepted value for future start/resume operations
- Added
current_limitfield tocoordinator.data(initialized from config'smax_current) - Added
NUMBER_CURRENT_LIMITconstant - Added
Platform.NUMBERto registered platforms - New file:
number.pywithBMWWallboxCurrentLimitNumberentity
- Added 8 new tests for the current limit number entity
- All 93 tests pass
- Updated COORDINATOR.md with new method signatures and behavior
- Updated ENTITIES.md with number entity details
This release completely rewrites how the integration controls charging, fixing critical issues that made pause/resume unreliable or impossible.
Symptoms:
- Pressing "Stop/Pause Charging" resulted in
Rejectedresponse - Logs showed:
SetChargingProfile response: Rejected - Charging continued despite pressing stop
Root Cause:
The previous implementation used incorrect SetChargingProfile parameters. The wallbox requires specific profile settings including proper stack_level, transaction_id, and clearing existing profiles first.
Symptoms:
RequestStopTransactionworked and stopped charging- But
RequestStartTransactionwas alwaysRejectedafterwards - Only unplugging the cable or rebooting the wallbox would fix it
Root Cause:
This is actually defined by the OCPP specification! After RequestStopTransaction, the charger enters "Finishing" state. From this state, it is NOT allowed to start a new transaction with an IdTag. This affects ALL OCPP-compliant chargers.
Source: Teltonika Community Discussion
Symptoms:
RequestStartTransactionreturnedAccepted- But power stayed at 0W
- Car showed "Preparing" but never charged
Root Cause:
The wallbox accepted the transaction but wasn't told to allow current flow. We now send SetChargingProfile(32A) immediately after starting a transaction to enable power delivery.
Symptoms:
- Using
SetChargingProfile(0A)to pause worked - But then the car detected 0A available and stopped the session
- Transaction ended automatically
Root Cause:
The wallbox had StopTxOnEVSideDisconnect enabled (default). When the car stops drawing power (because we set 0A), the wallbox ends the transaction. We now attempt to configure this setting to false on connect.
Named after the popular EVCC project, this approach controls charging by adjusting current limits instead of starting/stopping transactions:
| User Action | Old (Broken) Method | New (Working) Method |
|---|---|---|
| Pause | RequestStopTransaction → Stuck in "Finishing" |
SetChargingProfile(0A) → Transaction stays alive |
| Resume | RequestStartTransaction → Rejected |
SetChargingProfile(32A) → Instant resume |
| Start (new) | RequestStartTransaction → No power |
RequestStartTransaction + SetChargingProfile(32A) |
Benefits:
- ✅ No stuck transactions
- ✅ Instant pause/resume
- ✅ No wallbox reset needed
- ✅ Perfect for solar charging (adjust current dynamically)
- ✅ Works with BMW wallbox quirks
If all else fails, the integration can now automatically reboot the wallbox:
START pressed
↓
Try SetChargingProfile(32A) to resume existing transaction
↓ (if fails)
Try RequestStartTransaction + SetChargingProfile(32A)
↓ (if fails)
💣 NUKE: Reset(Immediate) → Wallbox reboots (~60 seconds)
↓
Charging auto-starts after reboot (if cable plugged in)
The NUKE is:
- Enabled by default (can disable with
allow_nuke=False) - Only triggers after ALL other methods fail
- Takes ~60 seconds for wallbox to reboot
- Charging usually auto-starts after reboot
- Smart RFID handling - Uses your configured RFID token, or
no_authorizationif RFID is disabled - Transaction ID refresh - Queries wallbox via
GetTransactionStatusbefore operations - Wallbox auto-configuration - Sets
StopTxOnEVSideDisconnect=falseon connect - Better logging - Detailed logs for debugging charging issues
All documentation now includes Mermaid flowcharts for visual understanding:
- COORDINATOR.md - Start charging decision tree, NUKE flow, data architecture
- PATTERNS.md - Decision trees for all charging operations
- TROUBLESHOOTING.md - Diagnostic flowcharts for:
- SSL/connection errors
- Command rejections
- Stuck transactions
- Quick diagnostic checklist
All 85 tests now pass:
- Button tests - Fixed entity ID mocking for Home Assistant
- Config flow tests - Fixed integration loading in test environment
- Coordinator tests - Fixed async task cleanup and timeout assertions
- Sensor tests - Updated for new icon and attribute values
New coordinator methods:
async_refresh_transaction_id()- Verify transaction is still activeasync_configure_wallbox_for_pause_resume()- Set wallbox config on connect
Modified methods:
async_start_charging(allow_nuke=True)- Smart start with NUKE fallbackasync_pause_charging()- EVCC-style pause viaSetChargingProfile(0A)async_resume_charging()- EVCC-style resume viaSetChargingProfile(32A)async_stop_charging()- Now callsasync_pause_charging()internally
pytest configuration:
- Added
asyncio_mode = "auto"for proper async test support
- Energy sensors showing 0 - Fixed issue where Energy Total and Energy Session showed 0.00 after Home Assistant restart
- Now automatically requests meter values when wallbox connects
- Simplified energy tracking to use wallbox values directly
- Removed unnecessary energy accumulation logic
- Energy sensors now display values directly from wallbox
- BREAKING: Removed period energy sensors - Daily, weekly, monthly, and yearly energy sensors have been removed
- Use Home Assistant's built-in Utility Meter helper instead for period-based tracking
- This provides better persistence, customizable reset times, and tariff support
- Documentation - Added comprehensive guide in README for setting up Utility Meter helpers
- Step-by-step instructions for UI and YAML configuration
- Examples for cost tracking with peak/off-peak tariffs
The custom period sensors had persistence issues (values reset on HA restart). Home Assistant's Utility Meter is the recommended, battle-tested solution that:
- ✅ Survives Home Assistant restarts
- ✅ Allows custom reset times
- ✅ Supports tariff tracking (peak/off-peak)
- ✅ Requires no integration code maintenance
After updating, set up Utility Meter helpers:
- Go to Settings → Devices & Services → Helpers
- Click + Create Helper → Utility Meter
- Select
sensor.energy_totalas input - Choose cycle: Daily/Weekly/Monthly/Yearly
Or via YAML:
utility_meter:
wallbox_energy_daily:
source: sensor.energy_total
cycle: daily- Lint Configuration - Fixed TOML parse error by moving
excludefield to correct section in pyproject.toml - Code formatting issues (whitespace on blank lines, import sorting)
- Added appropriate lint rule exceptions for common patterns (unused test fixtures, OCPP-specific naming conventions)
- Unused variable warnings in test files
- Energy Period Sensors Bug - Fixed critical issue where daily, weekly, monthly, and yearly energy sensors were all showing the same value (total energy) instead of their respective period consumption
- Period sensors now correctly track energy consumed in their specific time periods
- Removed incorrect addition of current session energy to period counters
- Comprehensive Linting Setup - Added Ruff, MyPy, and pre-commit hooks following Home Assistant best practices
- Development Tools - Added Makefile with quick commands (
make lint,make format,make test) - Code Quality Enforcement - CI now fails on formatting issues
- Contributing Guide - Added CONTRIBUTING.md with development guidelines
- Pre-commit Hooks - Automatic code formatting and validation on commit
- Automated trailing whitespace and blank line cleanup
- Improved GitHub Actions workflows with separate lint workflow
- Enhanced release workflow to continue on HACS validation errors
- Cleaned up all trailing whitespace and blank lines across codebase
- Updated pyproject.toml with comprehensive tool configurations
- Added .ruff-format-on-save.md guide for editor integration
- Added .github/DEVELOPMENT.md quick reference
- Updated all development documentation
- All Python files now have exactly 1 trailing newline (PEP 8 compliant)
- Ruff configured with Home Assistant-compatible rules
- MyPy strict type checking enabled
- Pre-commit hooks for automated quality checks
1.1.0 - 2024-12-08
- Energy Daily Sensor - Automatically resets at midnight for daily consumption tracking
- Energy Weekly Sensor - Automatically resets every Monday for weekly consumption tracking
- Energy Monthly Sensor - Automatically resets on 1st of month for monthly billing cycles
- Energy Yearly Sensor - Automatically resets on January 1st for annual consumption tracking
- Period-based energy sensors with automatic time-based resets
last_resetattribute on all period sensors showing when counter was last reset- Comprehensive energy sensor documentation (ENERGY_SENSORS.md)
- Energy Total Sensor - Now properly accumulates energy across ALL charging sessions
- Session end detection to prevent energy loss between charging sessions
- Energy Dashboard integration - sensor no longer resets with each session
- Cumulative energy tracking across wallbox restarts
- Energy Total sensor now uses true cumulative tracking (never resets)
- Period sensors include current session energy for real-time updates
- Improved energy measurement accuracy with 0.1 kWh session detection threshold
- Added
_check_and_reset_period_counters()method for automatic period resets - Session end detection based on energy value drops
- New coordinator data fields:
energy_cumulative,last_session_energy, period counters - Reset timestamps tracked for each period (daily/weekly/monthly/yearly)
- All period sensors use
state_class: TOTAL_INCREASINGfor proper HA statistics
- Updated ENTITIES.md with energy sensor details and examples
- Updated DATA_SCHEMAS.md with new cumulative tracking fields
- Updated CONSTANTS.md with new sensor constants
- Updated COORDINATOR.md with reset logic documentation
- Added comprehensive ENERGY_SENSORS.md guide with:
- Detailed usage instructions for each sensor
- Energy Dashboard setup guide
- Example automations and Lovelace cards
- Advanced use cases (solar optimization, dynamic pricing, load balancing)
- Troubleshooting section
- Migration guide
- Added comprehensive test coverage for all new energy sensors
- Tests verify period calculations with and without active sessions
- Tests verify last_reset attribute formatting
- All existing tests continue to pass
1.0.1 - 2024-12-07
- Release process documentation (RELEASES.md)
- Repository description and topics for better discoverability
- HACS validation workflow for continuous integration
- Manifest.json key ordering to pass Hassfest validation
- HACS.json now at repository root as required by HACS
- Repository metadata for HACS compliance
- Comprehensive guide for creating new releases
- Improved README with CI/CD badges
- Better project structure and organization
1.0.0 - 2024-12-07
- Initial public release
- OCPP 2.0.1 protocol support for BMW-branded wallboxes
- 37 comprehensive sensors for monitoring
- Real-time power, energy, current, and voltage monitoring
- Per-phase measurements (L1, L2, L3) for 3-phase installations
- Smart charging controls (start/stop, current limiting)
- Binary sensors for charging and connection status
- Start/Stop charging buttons
- Current limit control (0-32A)
- Energy Dashboard integration
- WebSocket Secure (WSS) connection
- SSL/TLS certificate support
- HACS installation support
- Config flow for easy setup
- Comprehensive documentation
- Test suite with pytest
- English translations
- Smart Start/Stop: EVCC-style charging control without stuck transactions
- Dynamic Current Limiting: Adjust charging current in real-time
- Transaction Management: Proper handling of OCPP charging sessions
- Connection Monitoring: Heartbeat and status tracking
- Meter Values: Real-time and periodic energy measurements
- Status Notifications: Connector and charging state updates
- Boot Notification: Device info and firmware tracking
- Acts as OCPP 2.0.1 Central System (server)
- Supports OCPP messages: BootNotification, StatusNotification, Heartbeat, TransactionEvent, NotifyReport
- Outgoing commands: RequestStartTransaction, RequestStopTransaction, SetChargingProfile, Reset
- Local-only operation (no cloud required)
- Async/await architecture for performance
- Proper error handling and logging
- Complete README with installation and usage
- Architecture documentation
- OCPP handler documentation
- Testing guide
- Troubleshooting guide
- Example automations for solar charging and dynamic limiting