mirror of
https://github.com/jdejaegh/irm-kmi-ha.git
synced 2025-06-27 03:35:56 +02:00
Update requirements
This commit is contained in:
parent
972ab3f9e6
commit
cf7519e7db
3 changed files with 36 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
aiohttp==3.10.10
|
||||
aiohttp==3.11.9
|
||||
async-timeout==4.0.3
|
||||
homeassistant==2024.11.1
|
||||
homeassistant==2024.12.0
|
||||
voluptuous==0.15.2
|
||||
svgwrite==1.4.3
|
||||
aiofile==3.9.0
|
|
@ -1,5 +1,5 @@
|
|||
homeassistant==2024.11.1
|
||||
pytest_homeassistant_custom_component==0.13.182
|
||||
homeassistant==2024.12.0
|
||||
pytest_homeassistant_custom_component==0.13.190
|
||||
pytest
|
||||
freezegun
|
||||
isort
|
|
@ -78,6 +78,11 @@ async def test_next_warning_when_data_available(
|
|||
warning = IrmKmiNextWarning(coordinator, mock_config_entry)
|
||||
warning.hass = hass
|
||||
|
||||
# This somehow fixes the following error that popped since 2024.12.0
|
||||
# ValueError: Entity <class 'custom_components.irm_kmi.sensor.IrmKmiNextWarning'> cannot have a translation key for
|
||||
# unit of measurement before being added to the entity platform
|
||||
warning._attr_translation_key = None
|
||||
|
||||
assert warning.state == "2024-01-12T06:00:00+00:00"
|
||||
assert len(warning.extra_state_attributes['next_warnings']) == 2
|
||||
|
||||
|
@ -98,6 +103,11 @@ async def test_next_warning_none_when_only_active_warnings(
|
|||
warning = IrmKmiNextWarning(coordinator, mock_config_entry)
|
||||
warning.hass = hass
|
||||
|
||||
# This somehow fixes the following error that popped since 2024.12.0
|
||||
# ValueError: Entity <class 'custom_components.irm_kmi.sensor.IrmKmiNextWarning'> cannot have a translation key for
|
||||
# unit of measurement before being added to the entity platform
|
||||
warning._attr_translation_key = None
|
||||
|
||||
assert warning.state is None
|
||||
assert len(warning.extra_state_attributes['next_warnings']) == 0
|
||||
|
||||
|
@ -115,6 +125,11 @@ async def test_next_warning_none_when_no_warnings(
|
|||
warning = IrmKmiNextWarning(coordinator, mock_config_entry)
|
||||
warning.hass = hass
|
||||
|
||||
# This somehow fixes the following error that popped since 2024.12.0
|
||||
# ValueError: Entity <class 'custom_components.irm_kmi.sensor.IrmKmiNextWarning'> cannot have a translation key for
|
||||
# unit of measurement before being added to the entity platform
|
||||
warning._attr_translation_key = None
|
||||
|
||||
assert warning.state is None
|
||||
assert len(warning.extra_state_attributes['next_warnings']) == 0
|
||||
|
||||
|
@ -124,6 +139,11 @@ async def test_next_warning_none_when_no_warnings(
|
|||
warning = IrmKmiNextWarning(coordinator, mock_config_entry)
|
||||
warning.hass = hass
|
||||
|
||||
# This somehow fixes the following error that popped since 2024.12.0
|
||||
# ValueError: Entity <class 'custom_components.irm_kmi.sensor.IrmKmiNextWarning'> cannot have a translation key for
|
||||
# unit of measurement before being added to the entity platform
|
||||
warning._attr_translation_key = None
|
||||
|
||||
assert warning.state is None
|
||||
assert len(warning.extra_state_attributes['next_warnings']) == 0
|
||||
|
||||
|
@ -146,6 +166,12 @@ async def test_next_sunrise_sunset(
|
|||
sunset = IrmKmiNextSunMove(coordinator, mock_config_entry, 'sunset')
|
||||
sunrise = IrmKmiNextSunMove(coordinator, mock_config_entry, 'sunrise')
|
||||
|
||||
# This somehow fixes the following error that popped since 2024.12.0
|
||||
# ValueError: Entity <class 'custom_components.irm_kmi.sensor.IrmKmiNextSunMove'> cannot have a translation key for
|
||||
# unit of measurement before being added to the entity platform
|
||||
sunrise._attr_translation_key = None
|
||||
sunset._attr_translation_key = None
|
||||
|
||||
assert datetime.fromisoformat(sunrise.state) == datetime.fromisoformat('2023-12-27T08:44:00+01:00')
|
||||
assert datetime.fromisoformat(sunset.state) == datetime.fromisoformat('2023-12-27T16:43:00+01:00')
|
||||
|
||||
|
@ -166,5 +192,11 @@ async def test_next_sunrise_sunset_bis(
|
|||
sunset = IrmKmiNextSunMove(coordinator, mock_config_entry, 'sunset')
|
||||
sunrise = IrmKmiNextSunMove(coordinator, mock_config_entry, 'sunrise')
|
||||
|
||||
# This somehow fixes the following error that popped since 2024.12.0
|
||||
# ValueError: Entity <class 'custom_components.irm_kmi.sensor.IrmKmiNextSunMove'> cannot have a translation key for
|
||||
# unit of measurement before being added to the entity platform
|
||||
sunrise._attr_translation_key = None
|
||||
sunset._attr_translation_key = None
|
||||
|
||||
assert datetime.fromisoformat(sunrise.state) == datetime.fromisoformat('2023-12-27T08:44:00+01:00')
|
||||
assert datetime.fromisoformat(sunset.state) == datetime.fromisoformat('2023-12-26T16:42:00+01:00')
|
||||
|
|
Loading…
Add table
Reference in a new issue