def action_wrapper_Confirmar(hermes, intentMessage, conf): global Snips #msg="Evento aceptado por "+e.user msg = "Evento aceptado" AceptedReminder('Voz') event = lastEventReminder() if (event): if (Snips.eventActive(event)): if (not event.rep): Snips.FinishEvent(event) else: Snips.NingunaVez(event) job = 'recordando tomar ' + event.med + ' a ' + event.user if (exist_Job(job)): Snips.scheduler1.remove_job('recordando tomar ' + event.med + ' a ' + event.user) hermes.publish_end_session(intentMessage.session_id, msg)
def run(self): while True: state = GPIO.input(self.BUTTON) if state: global Snips #msg="Evento aceptado por "+e.user msg = "Evento aceptado" AceptedReminder('Botón') event = lastEventReminder() if (event): if (Snips.eventActive(event)): if (not event.rep): Snips.FinishEvent(event) else: Snips.NingunaVez(event) job = 'recordando tomar ' + event.med + ' a ' + event.user if (self.exist_Job(job)): Snips.scheduler1.remove_job(job) say('default', msg) time.sleep(1)