summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/home/config/config.py1
-rwxr-xr-xsrc/relay_mqtt_bot.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/home/config/config.py b/src/home/config/config.py
index 37dd5e8..26e28f8 100644
--- a/src/home/config/config.py
+++ b/src/home/config/config.py
@@ -196,7 +196,6 @@ class AppConfigUnit(ConfigUnit):
class TranslationsUnit(BaseConfigUnit):
- _lang: str
_name: str
def __init__(self,
diff --git a/src/relay_mqtt_bot.py b/src/relay_mqtt_bot.py
index dbae007..2fb9d24 100755
--- a/src/relay_mqtt_bot.py
+++ b/src/relay_mqtt_bot.py
@@ -6,7 +6,7 @@ from typing import Optional, Union
from telegram import ReplyKeyboardMarkup
from functools import partial
-from home.config import config, AppConfigUnit
+from home.config import config, AppConfigUnit, TranslationsUnit
from home.telegram import bot
from home.telegram.config import TelegramBotConfig
from home.mqtt import MqttPayload, MqttNode, MqttWrapper, MqttModule
@@ -26,6 +26,10 @@ mqtt_nodes_config = MqttNodesConfig()
class RelayMqttBotConfig(AppConfigUnit, TelegramBotConfig):
NAME = 'relay_mqtt_bot'
+ def __init__(self):
+ super().__init__()
+ self._mqtt_nodes_strings = TranslationsUnit('mqtt_nodes')
+
@staticmethod
def schema() -> Optional[dict]:
return {