Esempio n. 1
0
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)
Esempio n. 2
0
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
Esempio n. 3
0
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)