diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b33f2b4..d4b41e61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,8 @@ jobs: python-version: '3.11' - ha-version: '2024.2' python-version: '3.12' + - ha-version: '2024.4' + python-version: '3.12' latest: true steps: - uses: actions/checkout@v3 diff --git a/custom_components/yandex_smart_home/config_flow.py b/custom_components/yandex_smart_home/config_flow.py index ddef4fca..5a27cde1 100644 --- a/custom_components/yandex_smart_home/config_flow.py +++ b/custom_components/yandex_smart_home/config_flow.py @@ -1,4 +1,5 @@ """Config flow for the Yandex Smart Home integration.""" + from __future__ import annotations import logging @@ -185,7 +186,7 @@ def __init__(self) -> None: self._data: ConfigType = {const.CONF_DEVICES_DISCOVERED: False} self._async_step_filter_settings_done = self.async_step_connection_type - async def async_step_user(self, user_input: ConfigType | None = None) -> FlowResult: + async def async_step_user(self, user_input: ConfigType | None = None) -> FlowResult: # type: ignore """Handle a flow initialized by the user.""" if self._async_current_entries(): return self.async_abort(reason="single_instance_allowed") diff --git a/tests/requirements_2024.4.txt b/tests/requirements_2024.4.txt new file mode 100644 index 00000000..370a49b6 --- /dev/null +++ b/tests/requirements_2024.4.txt @@ -0,0 +1,5 @@ +pytest-homeassistant-custom-component==0.13.112 +aiohttp-cors==0.7.0 +home_assistant_intents==2024.2.2 +hassil==1.5.1 +voluptuous-stubs==0.1.1 diff --git a/tests/test_handlers.py b/tests/test_handlers.py index ff7eb3d5..c834d5e4 100644 --- a/tests/test_handlers.py +++ b/tests/test_handlers.py @@ -490,9 +490,8 @@ async def set_instance_state(self, context: Context, state: ToggleCapabilityInst ] } - assert ( - caplog.records[-2].message == "Error code 'switch.test: WAT?' is invalid for switch.test (INTERNAL_ERROR)" - ) + records = list(filter(lambda x: x.module == "handlers", caplog.records)) + assert records[0].message == "Error code 'switch.test: WAT?' is invalid for switch.test (INTERNAL_ERROR)" hass.states.async_set("sensor.foo", "bar") payload = json.dumps(