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
- Manager
- SimpleClass
- homey.util.event_emitter.EventEmitter
- typing.Generic
- abc.ABC
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
| Name | Type | Description |
|---|---|---|
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) ‑> NoneDelete the given log.
Args
| Name | Type | Description |
|---|---|---|
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) ‑> InsightsLogGet 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.