1
0
mirror of https://github.com/MarkParker5/STARK.git synced 2025-07-12 22:50:22 +02:00

use new flow for creating commands

This commit is contained in:
MarkParker5
2021-11-01 13:51:35 +02:00
parent 7a2cfaa59b
commit 29ec54d064
22 changed files with 210 additions and 314 deletions

View File

@ -1,10 +1,12 @@
from .SmartHome import *
from .SmartHome import SmartHome
from ArchieCore import Response, Command
import Text2Speech
import os
################################################################################
def method(params):
@Command.new(primary = False)
def alarmclock(params):
text = voice = ''
Command.getCommand('tv on').start({})
Command.getCommand('window_open').start({})
@ -18,7 +20,3 @@ def method(params):
break
Text2Speech.Engine().generate(voice).speak()
return Response(text = text, voice = voice)
patterns = []
alarmclock = SmartHome('alarmclock', patterns)
alarmclock.setStart(method)