Hello, since I update my env dev this day with latest Home Assistant release 2023.3.1 my dev environment is broken.
I’ve got this error:
hass = <homeassistant.core.HomeAssistant object at 0xffff896da950>
domain = 'versatile_thermostat'
config = {'_': 'Not empty or else some bad checks for hass config in discovery.py breaks'}
async def async_setup_component(
hass: core.HomeAssistant, domain: str, config: ConfigType
) -> bool:
"""Set up a component and all its dependencies.
This method is a coroutine.
"""
if domain in hass.config.components:
return True
setup_tasks: dict[str, asyncio.Task[bool]] = hass.data.setdefault(DATA_SETUP, {})
if domain in setup_tasks:
return await setup_tasks[domain]
> task = setup_tasks[domain] = hass.async_create_task(
_async_setup_component(hass, domain, config), f"setup component {domain}"
)
E TypeError: async_test_home_assistant.<locals>.async_create_task() takes 1 positional argument but 2 were given
homeassistant/setup.py:95: TypeError
And I can’t get rid of this error. I try to reinstall previous release but without success. I try to update pytest-homeassistant-custom-component without success too.
What is really strange is that the hass.async_create_task() function takes 2 arguments.
Any help would be appreciated.
Note: this error only appears when I run unit test (pytest). If I start the server normally I have got no errors.