App
homey.app
The App class is your start point for any app. This class should be extended and exported as homey_export from app.py.
Example
from homey.app import App
class MyApp(App):
"""My Homey app"""
async def on_init(self):
self.log("MyApp has been initialized")
homey_export = MyApp
Ancestors
- SimpleClass
- homey.util.event_emitter.EventEmitter
- typing.Generic
Instance variables
homey
var homey : Final[Homey]The Homey instance this app is running on.
id
var id : Final[str]The ID of this app.
manifest
var manifest : Final[Any]The app.json manifest of this app.
sdk
var sdk : Final[int]The SDK version this app is using.
Methods
on_init
async def on_init(self) ‑> NoneThis method is called when initializing the app. It can be used for setup.
This method is expected to be overridden.
on_uninit
async def on_uninit(self) ‑> NoneThis method is called when unloading the app. It can be used for cleanup.
This method is expected to be overridden.