ManagerLogic

Access this instance at HomeyAPIV3Local.logic.

Extends

  • HomeyAPIV3.ManagerLogic

Classes

Instance Methods

createVariable

(async) createVariable(opts): Promise.<HomeyAPIV3Local.ManagerLogic.Variable>

Scopes

homey.logic

HTTP

POST /api/manager/logic/variable

Parameters

Name Type Description
opts
object
variable
object
name
string
type
string
value
string | number | boolean
}
}

Returns

deleteVariable

(async) deleteVariable(opts)

Scopes

homey.logic

HTTP

DELETE /api/manager/logic/variable/:id

Parameters

Name Type Description
opts
object
id
string
}

getState

(async) getState(): Promise.<any>

Scopes

homey.system.readonly

HTTP

GET /api/manager/logic/state

Returns

Promise.<any>

getVariable

(async) getVariable(opts): Promise.<HomeyAPIV3Local.ManagerLogic.Variable>

Scopes

homey.logic.readonly

HTTP

GET /api/manager/logic/variable/:id

Parameters

Name Type Description
opts
object
id
string
}

Returns

getVariables

(async) getVariables(): Promise.<Object.<string, HomeyAPIV3Local.ManagerLogic.Variable>>

Scopes

homey.logic.readonly

HTTP

GET /api/manager/logic/variable

Returns

Promise.<Object.<string, HomeyAPIV3Local.ManagerLogic.Variable>>

updateVariable

(async) updateVariable(opts): Promise.<HomeyAPIV3Local.ManagerLogic.Variable>

Scopes

homey.logic

HTTP

PUT /api/manager/logic/variable/:id

Parameters

Name Type Description
opts
object
id
string
variable
object
name
string <optional>
value
string | number | boolean <optional>
}
}

Returns

Events

variable.create

.on('variable.create')

Parameters

Name Type Description
variable
HomeyAPIV3Local.ManagerLogic.Variable

variable.delete

.on('variable.delete')

Parameters

Name Type Description
variable
HomeyAPIV3Local.ManagerLogic.Variable

variable.update

.on('variable.update')

Parameters

Name Type Description
variable
HomeyAPIV3Local.ManagerLogic.Variable