def button_mutealarm(): gpio.output(21, False) set_alarmstats('Muted') label_status.config(text="Alarm Muted", bg='green')
def button_ringalarm(): gpio.output(21, True) set_alarmstats('Ringing') label_status.config(text="Alarm Ringing", bg='red')
def telegram_mutealarm(bot, update): gpio.output(21, False) bot.sendMessage(update.message.chat_id, text=emojize("Alarm muted :white_check_mark:", use_aliases=True)) # update.message.reply_text(emojize("Alarm muted :white_check_mark:", use_aliases=True)) set_alarmstats('Muted')
def telegram_ringalarm(bot, update): gpio.output(21, True) bot.sendMessage(update.message.chat_id, text=emojize("Alarm ringing :heavy_exclamation_mark:", use_aliases=True)) # update.message.reply_text(emojize("Alarm ringing :heavy_exclamation_mark:", use_aliases=True)) set_alarmstats('Ringing')
def button_ringalarm(self): gpio.output(21, True) set_alarmstats('Ringing') self.alrm_status.config(text="Alarm Ringing", bg='red') bot.sendMessage(chat_id=221968006, text="Alarm Ringing")
def button_mutealarm(self): gpio.output(21, False) set_alarmstats('Muted') self.alrm_status.config(text="Alarm Muted", bg='green') bot.sendMessage(chat_id=221968006, text="Alarm Muted")