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
@@ -177,10 +177,9 @@ class BaseNotificationService:
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def async_send_message(self, message, **kwargs):
|
||||
async def async_send_message(self, message, **kwargs):
|
||||
"""Send a message.
|
||||
|
||||
kwargs can contain ATTR_TITLE to specify a title.
|
||||
This method must be run in the event loop and returns a coroutine.
|
||||
"""
|
||||
return self.hass.async_add_job(partial(self.send_message, message, **kwargs))
|
||||
await self.hass.async_add_job(partial(self.send_message, message, **kwargs))
|
||||
Reference in new issue
Block a user