Create settings options for different sinks

This commit is contained in:
Mark Veidemanis 2022-04-10 13:53:28 +01:00
parent f85342dc2e
commit 9151ab3ba6
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,7 @@
# from json import dumps
# Project imports
# from settings import settings
from settings import settings
import sinks.fidor
import sinks.nordigen
import sinks.truelayer
@ -28,8 +28,11 @@ class Sinks(util.Base):
We NEED the other libraries, and we initialise fast, so don't make
any race conditions by relying on something that might not be there.
"""
if settings.Fidor.enabled == "1":
self.fidor = sinks.fidor.Fidor()
if settings.Nordigen.enabled == "1":
self.nordigen = sinks.nordigen.Nordigen(self)
if settings.TrueLayer.enabled == "1":
self.truelayer = sinks.truelayer.TrueLayer(self)
# setattr(self.truelayer, "sinks", self)