Fix error for stt

This commit is contained in:
jbouwh 2023-06-28 12:05:42 +00:00
parent ee4459f41e
commit 723cd191fe

View file

@ -65,12 +65,15 @@ def async_setup_legacy(
return
try:
provider = await platform.async_get_engine(hass, p_config, discovery_info)
if hasattr(platform, "async_get_engine"):
provider = await platform.async_get_engine(
hass, p_config, discovery_info
)
provider.name = p_type
provider.hass = hass
provider.name = p_type
provider.hass = hass
providers[provider.name] = provider
providers[provider.name] = provider
except Exception: # pylint: disable=broad-except
_LOGGER.exception("Error setting up platform: %s", p_type)
return