Page 1 of 1

send command programatically

Posted: Wed Aug 31, 2022 12:16 am
by butteryak
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++

Re: send command programatically

Posted: Wed Aug 31, 2022 7:12 pm
by butteryak
Figured it out.

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