Kelvin SmartApps™ Configuration
Kelvin SmartApps™ Configuration can optionally be defined and accessed by Kelvin SmartApps™ in order to configure Kelvin SmartApps™ as a whole. This use case is gonna be explained in the following section.
It holds "global" Kelvin SmartApps™ configurations that can be defined through an arbitrarily Object structure upon the app.yaml. i.e.:
app:
type: kelvin
kelvin:
configuration:
connection:
ip: 192.168.0.1
port: 4747
credentials:
username: my-username
password: my-password
temperature_threshold_tolerance: 5
This is how to access the Kelvin SmartApps™ Configuration:
-
app_configurationObjectAccess a single
Kelvin SmartApps™ Configurationvalue directly from anapp_configurationDictionary Object embedded withinKelvinApp:import asyncio from kelvin.application import KelvinApp async def main() -> None: app = KelvinApp() await app.connect() (...) # Get IP ip = app.app_configuration["connection"]["ip"]Info
app.app_configurationwill only be available afterapp.connect()