Skip to content

Commit

Permalink
Fix version migration for older HA
Browse files Browse the repository at this point in the history
  • Loading branch information
danelphick authored and nathanmarlor committed Mar 4, 2024
1 parent 87cc924 commit 9ea08d4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions custom_components/foxess_em/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from datetime import time

from custom_components.foxess_em.battery.schedule import Schedule
from custom_components.foxess_em.const import CONNECTION_TYPE
from custom_components.foxess_em.const import FOX_MODBUS_TCP
from custom_components.foxess_em.fox.fox_modbus import FoxModbus
from custom_components.foxess_em.fox.fox_modbus_service import FoxModbuservice
from custom_components.foxess_em.util.peak_period_util import PeakPeriodUtils
Expand All @@ -22,7 +20,6 @@
MAJOR_VERSION as HA_MAJOR_VERSION,
MINOR_VERSION as HA_MINOR_VERSION,
)
from homeassistant.helpers import issue_registry
from homeassistant.helpers.aiohttp_client import async_get_clientsession

from .average.average_controller import AverageController
Expand All @@ -47,6 +44,7 @@
from .const import FOX_MODBUS_PORT
from .const import FOX_MODBUS_SERIAL
from .const import FOX_MODBUS_SLAVE
from .const import FOX_MODBUS_TCP
from .const import HOUSE_POWER
from .const import MIN_SOC
from .const import PLATFORMS
Expand Down Expand Up @@ -273,6 +271,6 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
version=BatteryManagerFlowHandler.VERSION,
)
else:
config_entry.version = config_flow.BatteryManagerFlowHandler.VERSION
config_entry.version = BatteryManagerFlowHandler.VERSION

return True

0 comments on commit 9ea08d4

Please sign in to comment.