(hass: HomeAssistant)
return name_to_type_map
Create a mapping of types of devices/entities Yandex Smart Home can support.
Create a mapping of types of devices/entities Yandex Smart Home can support.
Create a mapping of types of devices / entities Yandex Smart Home can support .
async def _async_name_to_type_map(hass: HomeAssistant) -> dict[str, str]:
    """Create a mapping of types of devices/entities Yandex Smart Home can support."""
    integrations = await asyncio.gather(
        *[async_get_integration(hass, domain) for domain in SUPPORTED_DOMAINS],
        return_exceptions=True,
    )
    name_to_type_map = {
        domain: domain
        if isinstance(integrations[idx], Exception)
        else integrations[idx].name
        for idx, domain in enumerate(SUPPORTED_DOMAINS)
    }

    return name_to_type_map
async def _async_name_to_type_map ( hass : HomeAssistant ) -> dict [ str , str ] : integrations = await asyncio . gather ( * [ async_get_integration ( hass , domain ) for domain in SUPPORTED_DOMAINS ] , return_exceptions = True , ) name_to_type_map = { domain : domain if isinstance ( integrations [ idx ] , Exception ) else integrations [ idx ] . name for idx , domain in enumerate ( SUPPORTED_DOMAINS ) } return name_to_type_map