def notify_external_device(message: str, notifier: str, **kwargs): # TODO: add more notification providers if notifier == "pushover": title = kwargs.get("notification_title") pushover_notify(message, title) elif notifier == "telegram": telegram_notify(message)
def notify_external_device(message: str, notifier: str, **kwargs): # TODO: add more notification providers # verify if message is unique with shelve.open('medihunter') as db: if not message in db: if notifier == 'pushover': title = kwargs.get('notification_title') pushover_notify(message, title) elif notifier == 'telegram': telegram_notify(message) db[message] = True
def notify_external_device(message: str, notifier: str): # TODO: add more notification providiers if notifier == 'pushover': pushover_notify(message) elif notifier == 'telegram': telegram_notify(message)