diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-06-09 17:59:30 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-06-09 17:59:30 +0300 |
commit | e9fc2c1835f7ac8e072919df81a6661c6308dea9 (patch) | |
tree | 447d5127da2f6606f39497fef344672a59997799 | |
parent | b26a622543076ee905a9ce920e791ec9d62ca865 (diff) |
wip
-rw-r--r-- | src/home/config/config.py | 1 | ||||
-rwxr-xr-x | src/relay_mqtt_bot.py | 6 |
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 { |