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