Expose create/delete cloudhook (#21606)
* Expose create/delete cloudhook * Make sure we dont publish cloudhooks when not connected
This commit is contained in:
1 parent
c25cbccca9
commit
f5ed6432eb
6 files changed
+153
-6
No files matched your search
@@ -14,6 +14,9 @@ class Cloudhooks:
|
||||
|
||||
async def async_publish_cloudhooks(self):
|
||||
"""Inform the Relayer of the cloudhooks that we support."""
|
||||
if not self.cloud.is_connected:
|
||||
return
|
||||
|
||||
cloudhooks = self.cloud.prefs.cloudhooks
|
||||
await self.cloud.iot.async_send_message('webhook-register', {
|
||||
'cloudhook_ids': [info['cloudhook_id'] for info
|
||||
|
||||
Reference in new issue
Block a user