X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=gcal_trigger.py;h=81e603ee95f54f57bf96aad9f3f74602e9a4ec5a;hb=addd4980077f6e3857c5c035b49784dc3ceca49a;hp=de19d1a1b2a5a28dce7a3e0f7265984b638d2e0e;hpb=5e241dc47e497c547463cecc07946ea6882835a7;p=kiosk.git diff --git a/gcal_trigger.py b/gcal_trigger.py index de19d1a..81e603e 100644 --- a/gcal_trigger.py +++ b/gcal_trigger.py @@ -1,13 +1,17 @@ -import constants +#!/usr/bin/env python3 + +from typing import List, Optional, Tuple + +import kiosk_constants as constants import globals import trigger class gcal_trigger(trigger.trigger): - def get_triggered_page_list(self): - if globals.get("gcal_triggered") == True: + def get_triggered_page_list(self) -> Optional[List[Tuple[str, int]]]: + if globals.get("gcal_triggered"): print("****** gcal has an imminent upcoming event. ******") - return (constants.gcal_imminent_pagename, trigger.trigger.PRIORITY_HIGH) + return [(constants.gcal_imminent_pagename, trigger.trigger.PRIORITY_HIGH)] else: return None