kopia lustrzana https://github.com/mate-dev/meshtastic-matrix-relay
Add plugins to conf_wrapper.py
rodzic
b15dc3b445
commit
6a30c3968f
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue