added template files. Added the start of timer.py

This commit is contained in:
samerbam 2023-06-14 10:38:04 -04:00
parent 15d1a0b58b
commit 698edf58f6
9 changed files with 33 additions and 0 deletions

0
skills/alarms.py Normal file
View File

0
skills/calendar.py Normal file
View File

0
skills/email.py Normal file
View File

0
skills/gpt.py Normal file
View File

0
skills/reminders.py Normal file
View File

33
skills/timers.py Normal file
View File

@ -0,0 +1,33 @@
class Timers:
def __init__(self):
self.trigger_phrase = "timer"
self.timers = {}
def _add_timer(self, time, name):
self.timers[name] = time
# use https://schedule.readthedocs.io/en/stable/examples.html#run-a-job-once to trigger self._trigger_timer()
def _remove_timer(self, name):
del self.timers[name]
def _trigger_timer(self, name):
if name in self.timers:
pass
#TODO: send ntfy.sh to device
#TODO: play timer done sound
def run(self, query):
if "add" in query:
time = 0 #TODO: Natural Language parse time out of phrase
self._add_timer(time)
return True # Return true to indicate success
if "remove" in query:
time = 0 #TODO: Natural Language parse time out of phrase
self._remove_timer(time)
return True
return False # Return false to indicate failure

0
skills/todos.py Normal file
View File

0
skills/weather.py Normal file
View File

0
skills/wolfram.py Normal file
View File