diff options
-rw-r--r-- | include/py/homekit/config/config.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/py/homekit/config/config.py b/include/py/homekit/config/config.py index f2a3990..29364af 100644 --- a/include/py/homekit/config/config.py +++ b/include/py/homekit/config/config.py @@ -76,6 +76,13 @@ class BaseConfigUnit(ABC): class ConfigUnit(BaseConfigUnit): NAME = 'dumb' + _instance = None + + def __new__(cls, *args, **kwargs): + if cls._instance is None: + cls._instance = super(ConfigUnit, cls).__new__(cls, *args, **kwargs) + return cls._instance + def __init__(self, name=None, load=True): super().__init__() |