Skip to content

Commit

Permalink
Add notification example to usage docs
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvervloesem committed Apr 22, 2021
1 parent 3260348 commit 7c840d0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ Try the example app `continue_session.py`_.

.. _`continue_session.py`: https://github.com/rhasspy/rhasspy-hermes-app/blob/master/examples/continue_session.py

******************
Notifying the user
******************

Your app's voice actions aren't limited to replying in a session. At any time, your app can inform the user of something without expecting a response. An example:

.. literalinclude:: ../examples/time_app_notification.py

This example starts a timer that notifies the user every minute with the current time. This is done using the :meth:`rhasspyhermes_app.HermesApp.notify` method, which accepts a message and a site ID.

Try the example app `time_app_notification.py`_.

.. _`time_app_notification.py`: https://github.com/rhasspy/rhasspy-hermes-app/blob/master/examples/time_app_notification.py

*******
Asyncio
*******
Expand Down

0 comments on commit 7c840d0

Please sign in to comment.