File tree Expand file tree Collapse file tree
custom_components/bmw_wallbox Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 1.6.1] - 2026-03-04
9+
10+ ### Fixed
11+
12+ - ** Migration error on upgrade** - Added missing ` async_migrate_entry ` handler for existing installations upgrading from v1.5.x
13+ - ** Options flow crash** - Fixed ` OptionsFlow ` constructor conflicting with HA's built-in ` config_entry ` property
14+
815## [ 1.6.0] - 2026-03-04
916
1017### Added
Original file line number Diff line number Diff line change 2727]
2828
2929
30+ async def async_migrate_entry (hass : HomeAssistant , config_entry : ConfigEntry ) -> bool :
31+ """Migrate old entry to new version."""
32+ _LOGGER .debug ("Migrating from version %s" , config_entry .version )
33+
34+ if config_entry .version == 1 :
35+ # Version 2 added scan_interval - no data changes needed,
36+ # coordinator falls back to DEFAULT_SCAN_INTERVAL if missing
37+ hass .config_entries .async_update_entry (config_entry , version = 2 )
38+
39+ _LOGGER .info ("Migration to version %s successful" , config_entry .version )
40+ return True
41+
42+
3043async def async_setup_entry (hass : HomeAssistant , entry : ConfigEntry ) -> bool :
3144 """Set up BMW Wallbox from a config entry."""
3245 _LOGGER .debug ("Setting up BMW Wallbox integration" )
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ def async_get_options_flow(
7676 config_entry : config_entries .ConfigEntry ,
7777 ) -> config_entries .OptionsFlow :
7878 """Get the options flow for this handler."""
79- return OptionsFlow (config_entry )
79+ return OptionsFlow ()
8080
8181 async def async_step_user (
8282 self , user_input : dict [str , Any ] | None = None
@@ -123,10 +123,6 @@ class InvalidSSLKey(HomeAssistantError):
123123class OptionsFlow (config_entries .OptionsFlow ):
124124 """Handle options flow for BMW Wallbox."""
125125
126- def __init__ (self , config_entry : config_entries .ConfigEntry ) -> None :
127- """Initialize options flow."""
128- self .config_entry = config_entry
129-
130126 async def async_step_init (
131127 self , user_input : dict [str , Any ] | None = None
132128 ) -> FlowResult :
Original file line number Diff line number Diff line change 1111 "requirements" : [
1212 " ocpp>=0.20.0"
1313 ],
14- "version" : " 1.6.0 "
14+ "version" : " 1.6.1 "
1515}
You can’t perform that action at this time.
0 commit comments