ManagerInsights

You can access this manager through the Homey instance as this.homey.insights

Methods

createLog

(async) createLog(id, options): Promise.<InsightsLog>

Create a log.

Parameters

Name Type Description
id
string

ID of the log (must be lowercase, alphanumeric)

options
object
title
string

Log's title

type
string

Value type, can be either number or boolean

units
string <optional>

Units of the values, e.g. °C

decimals
number <optional>

Number of decimals visible

}

Returns

Promise.<InsightsLog>

deleteLog

(async) deleteLog(log): Promise.<any>

Delete a log.

Parameters

Name Type Description
log
InsightsLog

Returns

Promise.<any>

getLog

(async) getLog(id): Promise.<InsightsLog>

Get a specific log belonging to this app.

Parameters

Name Type Description
id
string

ID of the log (must be lowercase, alphanumeric)

Returns

Promise.<InsightsLog>

getLogs

(async) getLogs(): Promise.<Array.<InsightsLog>>

Get all logs belonging to this app.

Returns

An array of InsightsLog instances

Promise.<Array.<InsightsLog>>