This commit is contained in:
Evgeny Zinoviev 2023-05-31 23:48:34 +03:00
parent bc98775dd7
commit 14e0b39b08

View File

@ -119,13 +119,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('sent'))
# notify(ctx.user, UserAction.WATERING_ON)
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('sent'))
# notify(ctx.user, UserAction.WATERING_OFF)
notify(ctx.user, UserAction.WATERING_OFF)
def notify(user: User, action: UserAction) -> None: