HomeyAPI~ManagerLogic

Methods

async getVariables(optsopt) → {Promise.<Object.<string, HomeyAPI.ManagerLogic.Variable>>}

Required OAuth scopes:
- homey.logic.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Attributes Description
filter HomeyAPI.ManagerLogic.Variable <optional>
A response filter (Using a filter will bypass all caches, use sparingely)
Returns:
Promise.<Object.<string, HomeyAPI.ManagerLogic.Variable>> - Successful response

async getVariable(optsopt) → {Promise.<HomeyAPI.ManagerLogic.Variable>}

Required OAuth scopes:
- homey.logic.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string
Returns:
Promise.<HomeyAPI.ManagerLogic.Variable> - Successful response

async updateVariable(optsopt) → {Promise.<HomeyAPI.ManagerLogic.Variable>}

Required OAuth scopes:
- homey.logic

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string
variable HomeyAPI.ManagerLogic.Variable
Returns:
Promise.<HomeyAPI.ManagerLogic.Variable> - Successful response

async deleteVariable(optsopt) → {Promise.<void>}

Required OAuth scopes:
- homey.logic

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string
Returns:
Promise.<void> - Successful response

async createVariable(optsopt) → {Promise.<HomeyAPI.ManagerLogic.Variable>}

Required OAuth scopes:
- homey.logic

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
variable HomeyAPI.ManagerLogic.Variable
Returns:
Promise.<HomeyAPI.ManagerLogic.Variable> - Successful response

async triggerWebhook(optsopt) → {Promise.<void>}

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Attributes Description
event object <optional>
tag object <optional>
Returns:
Promise.<void> - Successful response

destroy()

Unsubscribes to realtime events, clear all caches, and remove all event listeners for this manager and it's managed objects

Events

variable.create

Fired when a managed Variable is created
Parameters:
Name Type Description
variable HomeyAPI.ManagerLogic.Variable The affected Variable

variable.update

Fired when a managed Variable is changed
Parameters:
Name Type Description
variable HomeyAPI.ManagerLogic.Variable The affected Variable

variable.delete

Fired when a managed Variable has been deleted
Parameters:
Name Type Description
variable HomeyAPI.ManagerLogic.Variable The affected Variable

Classes

Error

Variable