butteryak
Posts: 16
Joined: Fri Aug 23, 2019 2:25 am

send command programatically

Wed Aug 31, 2022 12:16 am

So typically one would do something like "hey google, what time is it" or "what is the weather. I was wondering if there was a way to do the same thing via code.

such as:

if event.type == EventType.ON_ALERT_STARTED:
do this thing ('what time is it")

so that everytime the eventype alert was triggered, I could initiate a command, as I would as if I was saying it.

Thanks much++

butteryak
Posts: 16
Joined: Fri Aug 23, 2019 2:25 am

Re: send command programatically

Wed Aug 31, 2022 7:12 pm

Figured it out.

if event.type == EventType.ON_ALERT_STARTED:
self.assistant.send_text_query('Do a thing.')

Return to “AIY Projects”