mirror of
https://github.com/jdejaegh/irm-kmi-ha.git
synced 2025-06-27 11:39:26 +02:00
Update dependencies
This commit is contained in:
parent
09de4fbaa7
commit
ec84b405de
6 changed files with 15 additions and 18 deletions
|
@ -62,23 +62,19 @@ async def async_migrate_entry(hass, config_entry: ConfigEntry):
|
||||||
new = {**config_entry.data}
|
new = {**config_entry.data}
|
||||||
if config_entry.version == 1:
|
if config_entry.version == 1:
|
||||||
new = new | {CONF_STYLE: OPTION_STYLE_STD, CONF_DARK_MODE: True}
|
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, version=2)
|
||||||
hass.config_entries.async_update_entry(config_entry, data=new)
|
|
||||||
|
|
||||||
if config_entry.version == 2:
|
if config_entry.version == 2:
|
||||||
new = new | {CONF_USE_DEPRECATED_FORECAST: OPTION_DEPRECATED_FORECAST_NOT_USED}
|
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, version=3)
|
||||||
hass.config_entries.async_update_entry(config_entry, data=new)
|
|
||||||
|
|
||||||
if config_entry.version == 3:
|
if config_entry.version == 3:
|
||||||
new = new | {CONF_LANGUAGE_OVERRIDE: None}
|
new = new | {CONF_LANGUAGE_OVERRIDE: None}
|
||||||
config_entry.version = 4
|
hass.config_entries.async_update_entry(config_entry, data=new, version=4)
|
||||||
hass.config_entries.async_update_entry(config_entry, data=new)
|
|
||||||
|
|
||||||
if config_entry.version == 4:
|
if config_entry.version == 4:
|
||||||
new[CONF_LANGUAGE_OVERRIDE] = 'none' if new[CONF_LANGUAGE_OVERRIDE] is None else new[CONF_LANGUAGE_OVERRIDE]
|
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, version=5)
|
||||||
hass.config_entries.async_update_entry(config_entry, data=new)
|
|
||||||
|
|
||||||
_LOGGER.debug(f"Migration to version {config_entry.version} successful")
|
_LOGGER.debug(f"Migration to version {config_entry.version} successful")
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"issue_tracker": "https://github.com/jdejaegh/irm-kmi-ha/issues",
|
"issue_tracker": "https://github.com/jdejaegh/irm-kmi-ha/issues",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"svgwrite==1.4.3",
|
"svgwrite==1.4.3",
|
||||||
"aiofile==3.8.8"
|
"aiofile==3.9.0"
|
||||||
],
|
],
|
||||||
"version": "0.2.19"
|
"version": "0.2.19"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
aiohttp==3.9.5
|
aiohttp==3.10.8
|
||||||
async-timeout==4.0.3
|
async-timeout==4.0.3
|
||||||
homeassistant==2024.6.4
|
homeassistant==2024.10.4
|
||||||
voluptuous==0.13.1
|
voluptuous==0.15.2
|
||||||
svgwrite==1.4.3
|
svgwrite==1.4.3
|
||||||
aiofile==3.8.8
|
aiofile==3.9.0
|
|
@ -1,5 +1,5 @@
|
||||||
homeassistant==2024.6.4
|
homeassistant==2024.10.4
|
||||||
pytest_homeassistant_custom_component==0.13.136
|
pytest_homeassistant_custom_component==0.13.175
|
||||||
pytest
|
pytest
|
||||||
freezegun
|
freezegun
|
||||||
isort
|
isort
|
|
@ -93,8 +93,8 @@ async def test_daily_forecast(
|
||||||
mock_config_entry: MockConfigEntry
|
mock_config_entry: MockConfigEntry
|
||||||
) -> None:
|
) -> None:
|
||||||
api_data = get_api_data("forecast.json").get('for', {}).get('daily')
|
api_data = get_api_data("forecast.json").get('for', {}).get('daily')
|
||||||
|
await hass.config_entries.async_add(mock_config_entry)
|
||||||
mock_config_entry.data = mock_config_entry.data | {CONF_LANGUAGE_OVERRIDE: 'fr'}
|
hass.config_entries.async_update_entry(mock_config_entry, data=mock_config_entry.data | {CONF_LANGUAGE_OVERRIDE: 'fr'})
|
||||||
coordinator = IrmKmiCoordinator(hass, mock_config_entry)
|
coordinator = IrmKmiCoordinator(hass, mock_config_entry)
|
||||||
result = await coordinator.daily_list_to_forecast(api_data)
|
result = await coordinator.daily_list_to_forecast(api_data)
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,8 @@ async def test_next_warning_when_data_available(
|
||||||
mock_config_entry: MockConfigEntry
|
mock_config_entry: MockConfigEntry
|
||||||
) -> None:
|
) -> None:
|
||||||
api_data = get_api_data("be_forecast_warning.json")
|
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)
|
coordinator = IrmKmiCoordinator(hass, mock_config_entry)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue