SimpleClass

homey.simple_class

This is a simple class with log functions.

Ancestors

  • homey.util.event_emitter.EventEmitter
  • typing.Generic

Subclasses

Methods

log

def log(self, *args: Any) ‑> None

Log the given arguments, emitting a __log event.

error

def error(self, *args: Any) ‑> None

Log the given arguments, emitting an __error event.

debug

def debug(self, *args: Any) ‑> None

Log the given arguments, emitting a __debug event.

on_log

def on_log(self, f: Callable[..., None]) ‑> Self

The __log event is fired when the SimpleClass.log() method is called.

Args

NameTypeDescription
f Callable[..., None] A callback that receives the positional arguments passed to SimpleClass.log()

on_error

def on_error(self, f: Callable[..., None]) ‑> Self

The __error event is fired when the SimpleClass.error() method is called.

Args

NameTypeDescription
f Callable[..., None] A callback that receives the positional arguments passed to SimpleClass.error()

on_debug

def on_debug(self, f: Callable[..., None]) ‑> Self

The __debug event is fired when the SimpleClass.debug() method is called.

Args

NameTypeDescription
f Callable[..., None] A callback that receives the positional arguments passed to SimpleClass.debug()