ManagerCloud
homey.manager.cloud
Manages interactions with the Homey cloud.
This includes OAuth2 and Webhooks.
You can access this manager through the Homey instance as self.homey.cloud.
Ancestors
- Manager
- SimpleClass
- homey.util.event_emitter.EventEmitter
- typing.Generic
- abc.ABC
Methods
create_oauth2_callback
async def create_oauth2_callback(self, url: str) ‑> CloudOAuth2CallbackGenerate an OAuth2 callback.
Args
| Name | Type | Description |
|---|---|---|
url |
str | The API url for which to create a callback. |
create_webhook
async def create_webhook(self, id: str, secret: str, data: dict = {}) ‑> CloudWebhookRegister a handler for a webhook registered with Homey.
Args
| Name | Type | Description |
|---|---|---|
id |
str | The ID given after registering the webhook. |
secret |
str | The secret given after registering the webhook. |
data |
dict | Data used to identify this Homey in calls to the webhook. |
unregister_webhook
async def unregister_webhook(self, webhook: CloudWebhook) ‑> NoneUnregister the given webhook handler.
Args
| Name | Type | Description |
|---|---|---|
webhook |
CloudWebhook | The CloudWebhook to unregister.` |
get_homey_id
async def get_homey_id(self) ‑> strGet the Homey's cloud ID.
get_local_address
async def get_local_address(self) ‑> strGet the Homey's local address and port.