Fix callback and async (#31281)
* Fix callback and async * Fix a return * Fix test * Fix mqtt tests * Fix some more callbacks
This commit is contained in:
1 parent
ee602e40a6
commit
e9e44dbd97
90 files changed
+627
-883
No files matched your search
@@ -501,14 +501,12 @@ class Provider:
|
||||
"""Load tts audio file from provider."""
|
||||
raise NotImplementedError()
|
||||
|
||||
def async_get_tts_audio(self, message, language, options=None):
|
||||
async def async_get_tts_audio(self, message, language, options=None):
|
||||
"""Load tts audio file from provider.
|
||||
|
||||
Return a tuple of file extension and data as bytes.
|
||||
|
||||
This method must be run in the event loop and returns a coroutine.
|
||||
"""
|
||||
return self.hass.async_add_job(
|
||||
return await self.hass.async_add_job(
|
||||
ft.partial(self.get_tts_audio, message, language, options=options)
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user