From 6a30c3968f31904f5a1aae3e1bf7d90c2589d7d6 Mon Sep 17 00:00:00 2001 From: mate71pl <67105053+mate71pl@users.noreply.github.com> Date: Sun, 14 Jul 2024 21:32:25 +0200 Subject: [PATCH] Add plugins to conf_wrapper.py --- conf_wrapper.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/conf_wrapper.py b/conf_wrapper.py index 8502f6c..490a630 100644 --- a/conf_wrapper.py +++ b/conf_wrapper.py @@ -50,9 +50,25 @@ if nodes_plugin_active: plugins_config["nodes"] = {"active": nodes_plugin_active.lower() == "true"} chutilz_plugin_active = os.environ.get('CHUTILZ_PLUGIN_ACTIVE') -if nodes_plugin_active: +if chutilz_plugin_active: plugins_config["chutilz"] = {"active": chutilz_plugin_active.lower() == "true"} +airutilz_plugin_active = os.environ.get('AIRUTILZ_PLUGIN_ACTIVE') +if airutilz_plugin_active: + plugins_config["airutilz"] = {"active": airutilz_plugin_active.lower() == "true"} + +battery_plugin_active = os.environ.get('BATTERY_PLUGIN_ACTIVE') +if battery_plugin_active: + plugins_config["battery"] = {"active": battery_plugin_active.lower() == "true"} + +voltage_plugin_active = os.environ.get('VOLTAGE_PLUGIN_ACTIVE') +if voltage_plugin_active: + plugins_config["voltage"] = {"active": voltage_plugin_active.lower() == "true"} + +snr_plugin_active = os.environ.get('SNR_PLUGIN_ACTIVE') +if snr_plugin_active: + plugins_config["snr"] = {"active": snr_plugin_active.lower() == "true"} + # Add the plugins dictionary to the relay_config if it's not empty if plugins_config: relay_config["plugins"] = plugins_config