You are currently viewing the Homey Apps SDK v2 documentation. New apps should use Homey Apps SDK v3 ››

Homey.ManagerInsights

const { ManagerInsights } = require('homey');

Table of Contents

Methods

createLog(id, options, callbackopt) → {Promise}

Create a log.

Parameters:
Name Type Attributes 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

units string <optional>

Units of the values, e.g. °C

decimals number <optional>

Number of decimals visible

callback function <optional>
Name Type Description
err Error
log InsightsLog
Returns:
Type:
Promise

deleteLog(log, callbackopt) → {Promise}

Delete a log.

Parameters:
Name Type Attributes Description
log InsightsLog
callback genericCallbackFunction <optional>
Returns:
Type:
Promise

getLog(id, callbackopt) → {Promise}

Get a specific log belonging to this app.

Parameters:
Name Type Attributes Description
id string

ID of the log (must be lowercase, alphanumeric)

callback function <optional>
Name Type Description
err Error
log InsightsLog
Returns:
Type:
Promise

getLogs(callbackopt) → {Promise}

Get all logs belonging to this app.

Parameters:
Name Type Attributes Description
callback function <optional>
Name Type Description
err Error
logs Array

An array of InsightsLog instances

Returns:
Type:
Promise