Skip to content

Commit

Permalink
CI: Add testing against HA 2024.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dext0r committed Apr 8, 2024
1 parent 71f81f3 commit 886f314
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion custom_components/yandex_smart_home/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config flow for the Yandex Smart Home integration."""

from __future__ import annotations

import logging
Expand Down Expand Up @@ -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")
Expand Down
5 changes: 5 additions & 0 deletions tests/requirements_2024.4.txt
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions tests/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 886f314

Please sign in to comment.