Fixed code typo
This commit is contained in:
parent
1d90d5a317
commit
9ce776edfa
1 changed files with 4 additions and 4 deletions
|
@ -411,21 +411,21 @@ def pause_music_when_conversation_starts():
|
|||
# Note: (limited) support for regular expressions on `phrase`
|
||||
# This hook will match any phrase containing either "turn on the lights"
|
||||
# or "turn off the lights"
|
||||
@when(SpeechRecognizedEvent, phrase="turn on (the?) lights")
|
||||
@when(SpeechRecognizedEvent, phrase="turn on (the)? lights")
|
||||
def lights_on_command():
|
||||
run(f"{light_plugin}.on")
|
||||
# Or, with arguments:
|
||||
# run(f"{light_plugin}.on", groups=["Bedroom"])
|
||||
|
||||
@when(SpeechRecognizedEvent, phrase="turn off (the?) lights")
|
||||
@when(SpeechRecognizedEvent, phrase="turn off (the)? lights")
|
||||
def lights_off_command():
|
||||
run(f"{light_plugin}.off")
|
||||
|
||||
@when(SpeechRecognizedEvent, phrase="play (the?) music")
|
||||
@when(SpeechRecognizedEvent, phrase="play (the)? music")
|
||||
def play_music_command():
|
||||
run(f"{music_plugin}.play")
|
||||
|
||||
@when(SpeechRecognizedEvent, phrase="stop (the?) music")
|
||||
@when(SpeechRecognizedEvent, phrase="stop (the)? music")
|
||||
def stop_music_command():
|
||||
run(f"{music_plugin}.stop")
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue