ManagerInsights

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

Table of Contents

Methods

(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
Name Type Attributes Description
title string

Log's title

type string

Value type, can be either number or boolean

chart string <optional>

Chart type, can be either line, area, stepLine, column, spline, splineArea or scatter

units string <optional>

Units of the values, e.g. °C

decimals number <optional>

Number of decimals visible

Returns:
Type:
Promise.<InsightsLog>

(async) deleteLog(log) → {Promise.<any>}

Delete a log.

Parameters:
Name Type Description
log InsightsLog
Returns:
Type:
Promise.<any>

(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:
Type:
Promise.<InsightsLog>

(async) getLogs() → {Promise.<Array.<InsightsLog>>}

Get all logs belonging to this app.

Returns:
Type:
Promise.<Array.<InsightsLog>>

An array of InsightsLog instances