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

In body

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

In path

}

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

In path

}

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

In path

variable
object

In body

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
info
object
newValues
object

An object with only the new values of the variable

oldValues
object

An object with only the old values of the variable

changedKeys
Array.<string>

An array of keys of the properties that have changed

}