Plugin Config Refactor
Combining the plugin list and settings into one object would solve several problems:
- Multiple copies of a plugin get unique config (e.g. rtl_433, Adaptec_HBA).
- Solves potential plugin config naming mismatch
- Enables abstraction of plugin config, reducing code duplication
Example config.py
:
PLUGINS: Union[str, Tuple[str, dict[str, Any]]] = []
# Simple plugin with no config
PLUGINS.append("Uptime")
# Run 2 copies of the plugin with separate config
PLUGINS.extend([
("Adaptec_HBA", {"id": 1}),
("Adaptec_HBA", {"id": 2}),
])
Edited by David G. Martin IV