This commit is contained in:
Evgeny Zinoviev 2023-05-31 23:19:03 +03:00
parent 2996e4b22e
commit 081cd0d4bb

View File

@ -37,11 +37,11 @@ bot.lang.ru(
enable="Включить",
enable_silently="Включить тихо",
enabled="Включен ✅",
enabled="Насос включен ✅",
disable="Выключить",
disable_silently="Выключить тихо",
disabled="Выключен ❌",
disabled="Насос выключен ❌",
start_watering="Включить полив",
stop_watering="Отключить полив",
@ -50,6 +50,8 @@ bot.lang.ru(
watering_status="Статус полива",
done="Готово 👌",
sent="Команда отправлена",
user_action_notification='Пользователь <a href="tg://user?id=%d">%s</a> <b>%s</b> насос.',
user_watering_notification='Пользователь <a href="tg://user?id=%d">%s</a> <b>%s</b> полив.',
user_action_on="включил",
@ -63,11 +65,11 @@ bot.lang.en(
enable="Turn ON",
enable_silently="Turn ON silently",
enabled="Turned ON ✅",
enabled="The pump is turned ON ✅",
disable="Turn OFF",
disable_silently="Turn OFF silently",
disabled="Turned OFF ❌",
disabled="The pump is turned OFF ❌",
start_watering="Start watering",
stop_watering="Stop watering",
@ -76,6 +78,8 @@ bot.lang.en(
watering_status="Watering status",
done="Done 👌",
sent="Request sent",
user_action_notification='User <a href="tg://user?id=%d">%s</a> turned the pump <b>%s</b>.',
user_watering_notification='User <a href="tg://user?id=%d">%s</a> <b>%s</b> the watering.',
user_action_on="ON",
@ -114,13 +118,13 @@ def off(ctx: bot.Context, silent=False) -> None:
def watering_on(ctx: bot.Context) -> None:
mqtt_relay_module.switchpower(mqtt, True, config.get('mqtt_water_relay.secret'))
ctx.reply(ctx.lang('done'))
ctx.reply(ctx.lang('sent'))
# notify(ctx.user, UserAction.WATERING_ON)
def watering_off(ctx: bot.Context) -> None:
mqtt_relay_module.switchpower(mqtt, False, config.get('mqtt_water_relay.secret'))
ctx.reply(ctx.lang('done'))
ctx.reply(ctx.lang('sent'))
# notify(ctx.user, UserAction.WATERING_OFF)