ManagerInsights

homey.manager.insights

Manages logs in the app's insights. You can access this manager through the Homey instance as self.homey.insights.

Ancestors

Methods

create_log

async def create_log(self, id: str, title: str, units: str | None = None, decimals: int | None = None) ‑> InsightsLog[float]

Create a numeric insights log.

Args

NameTypeDescription
id str ID of the log, lowercase and alphanumeric.
title str Title of the log.
units str | None Units of the logged values.
decimals int | None Visible number of decimals.

Raises

AlreadyExists
Raised if the log ID is already in use.

delete_log

async def delete_log(self, log: InsightsLog) ‑> None

Delete the given log.

Args

NameTypeDescription
log InsightsLog The InsightsLog to delete.

Raises

NotFound
Raised if no log with the given ID is found.

get_log

async def get_log(self, id: str) ‑> InsightsLog

Get the log with given ID.

Raises

NotFound
Raised if no log with the given ID is found.

get_logs

async def get_logs(self) ‑> tuple[InsightsLog, ...]

Get all logs belonging to this app.

Inherited members