Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jdejaegh committed Oct 27, 2024
1 parent 09de4fb commit ec84b40
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
12 changes: 4 additions & 8 deletions custom_components/irm_kmi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,19 @@ async def async_migrate_entry(hass, config_entry: ConfigEntry):
new = {**config_entry.data}
if config_entry.version == 1:
new = new | {CONF_STYLE: OPTION_STYLE_STD, CONF_DARK_MODE: True}
config_entry.version = 2
hass.config_entries.async_update_entry(config_entry, data=new)
hass.config_entries.async_update_entry(config_entry, data=new, version=2)

if config_entry.version == 2:
new = new | {CONF_USE_DEPRECATED_FORECAST: OPTION_DEPRECATED_FORECAST_NOT_USED}
config_entry.version = 3
hass.config_entries.async_update_entry(config_entry, data=new)
hass.config_entries.async_update_entry(config_entry, data=new, version=3)

if config_entry.version == 3:
new = new | {CONF_LANGUAGE_OVERRIDE: None}
config_entry.version = 4
hass.config_entries.async_update_entry(config_entry, data=new)
hass.config_entries.async_update_entry(config_entry, data=new, version=4)

if config_entry.version == 4:
new[CONF_LANGUAGE_OVERRIDE] = 'none' if new[CONF_LANGUAGE_OVERRIDE] is None else new[CONF_LANGUAGE_OVERRIDE]
config_entry.version = 5
hass.config_entries.async_update_entry(config_entry, data=new)
hass.config_entries.async_update_entry(config_entry, data=new, version=5)

_LOGGER.debug(f"Migration to version {config_entry.version} successful")

Expand Down
2 changes: 1 addition & 1 deletion custom_components/irm_kmi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"issue_tracker": "https://github.com/jdejaegh/irm-kmi-ha/issues",
"requirements": [
"svgwrite==1.4.3",
"aiofile==3.8.8"
"aiofile==3.9.0"
],
"version": "0.2.19"
}
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
aiohttp==3.9.5
aiohttp==3.10.8
async-timeout==4.0.3
homeassistant==2024.6.4
voluptuous==0.13.1
homeassistant==2024.10.4
voluptuous==0.15.2
svgwrite==1.4.3
aiofile==3.8.8
aiofile==3.9.0
4 changes: 2 additions & 2 deletions requirements_tests.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
homeassistant==2024.6.4
pytest_homeassistant_custom_component==0.13.136
homeassistant==2024.10.4
pytest_homeassistant_custom_component==0.13.175
pytest
freezegun
isort
4 changes: 2 additions & 2 deletions tests/test_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ async def test_daily_forecast(
mock_config_entry: MockConfigEntry
) -> None:
api_data = get_api_data("forecast.json").get('for', {}).get('daily')

mock_config_entry.data = mock_config_entry.data | {CONF_LANGUAGE_OVERRIDE: 'fr'}
await hass.config_entries.async_add(mock_config_entry)
hass.config_entries.async_update_entry(mock_config_entry, data=mock_config_entry.data | {CONF_LANGUAGE_OVERRIDE: 'fr'})
coordinator = IrmKmiCoordinator(hass, mock_config_entry)
result = await coordinator.daily_list_to_forecast(api_data)

Expand Down
3 changes: 2 additions & 1 deletion tests/test_sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ async def test_next_warning_when_data_available(
mock_config_entry: MockConfigEntry
) -> None:
api_data = get_api_data("be_forecast_warning.json")
mock_config_entry.data = mock_config_entry.data | {CONF_LANGUAGE_OVERRIDE: 'de'}
await hass.config_entries.async_add(mock_config_entry)
hass.config_entries.async_update_entry(mock_config_entry, data=mock_config_entry.data | {CONF_LANGUAGE_OVERRIDE: 'de'})

coordinator = IrmKmiCoordinator(hass, mock_config_entry)

Expand Down

0 comments on commit ec84b40

Please sign in to comment.