assistant#

class platypush.message.event.assistant.AlarmEndEvent(*args, assistant=None, **kwargs)[source]#

Bases: AlertEndEvent

Event triggered when an alarm ends on the assistant

class platypush.message.event.assistant.AlarmStartedEvent(*args, assistant=None, **kwargs)[source]#

Bases: AlertStartedEvent

Event triggered when an alarm starts on the assistant

class platypush.message.event.assistant.AlertEndEvent(*args, assistant=None, **kwargs)[source]#

Bases: AssistantEvent

Event triggered when an alert ends on the assistant

class platypush.message.event.assistant.AlertStartedEvent(*args, assistant=None, **kwargs)[source]#

Bases: AssistantEvent

Event triggered when an alert starts on the assistant

class platypush.message.event.assistant.AssistantEvent(*args, assistant=None, **kwargs)[source]#

Bases: Event

Base class for assistant events

__init__(*args, assistant=None, **kwargs)[source]#
Parameters:
  • target (str) – Target node

  • origin (str) – Origin node (default: current node)

  • id (str) – Event ID (default: auto-generated)

  • timestamp (float) – Event timestamp (default: current time)

  • logging_level – Logging level for this event (default: logging.INFO)

  • disable_web_clients_notification – Don’t send a notification of this event to the websocket clients

  • kwargs – Additional arguments for the event

class platypush.message.event.assistant.ConversationEndEvent(*args, with_follow_on_turn=False, **kwargs)[source]#

Bases: AssistantEvent

Event triggered when a conversation ends

__init__(*args, with_follow_on_turn=False, **kwargs)[source]#
Parameters:

with_follow_on_turn (str) – Set to true if the conversation expects a user follow-up, false otherwise

class platypush.message.event.assistant.ConversationStartEvent(*args, **kwargs)[source]#

Bases: AssistantEvent

Event triggered when a new conversation starts

__init__(*args, **kwargs)[source]#
Parameters:
  • target (str) – Target node

  • origin (str) – Origin node (default: current node)

  • id (str) – Event ID (default: auto-generated)

  • timestamp (float) – Event timestamp (default: current time)

  • logging_level – Logging level for this event (default: logging.INFO)

  • disable_web_clients_notification – Don’t send a notification of this event to the websocket clients

  • kwargs – Additional arguments for the event

class platypush.message.event.assistant.ConversationTimeoutEvent(*args, **kwargs)[source]#

Bases: ConversationEndEvent

Event triggered when a conversation times out

__init__(*args, **kwargs)[source]#
Parameters:

with_follow_on_turn (str) – Set to true if the conversation expects a user follow-up, false otherwise

class platypush.message.event.assistant.HotwordDetectedEvent(*args, hotword=None, **kwargs)[source]#

Bases: AssistantEvent

Event triggered when a custom hotword is detected

__init__(*args, hotword=None, **kwargs)[source]#
Parameters:

hotword (str) – The detected user hotword

class platypush.message.event.assistant.MicMutedEvent(*args, assistant=None, **kwargs)[source]#

Bases: AssistantEvent

Event triggered when the microphone is muted.

class platypush.message.event.assistant.MicUnmutedEvent(*args, assistant=None, **kwargs)[source]#

Bases: AssistantEvent

Event triggered when the microphone is muted.

class platypush.message.event.assistant.NoResponseEvent(*args, with_follow_on_turn=False, **kwargs)[source]#

Bases: ConversationEndEvent

Event triggered when a conversation ends with no response

class platypush.message.event.assistant.ResponseEvent(response_text, *args, **kwargs)[source]#

Bases: ConversationEndEvent

Event triggered when a response is processed by the assistant

__init__(response_text, *args, **kwargs)[source]#
Parameters:

response_text (str) – Response text processed by the assistant

class platypush.message.event.assistant.SpeechRecognizedEvent(phrase, *args, **kwargs)[source]#

Bases: AssistantEvent

Event triggered when a speech is recognized

__init__(phrase, *args, **kwargs)[source]#
Parameters:

phrase (str) – Recognized user phrase

matches_condition(condition)[source]#

Overrides matches condition, and stops the conversation to prevent the default assistant response if the event matched some event hook condition

class platypush.message.event.assistant.TimerEndEvent(*args, assistant=None, **kwargs)[source]#

Bases: AlertEndEvent

Event triggered when a timer ends on the assistant

class platypush.message.event.assistant.TimerStartedEvent(*args, assistant=None, **kwargs)[source]#

Bases: AlertStartedEvent

Event triggered when a timer starts on the assistant

class platypush.message.event.assistant.VolumeChangedEvent(volume, *args, **kwargs)[source]#

Bases: AssistantEvent

Event triggered when the volume of the assistant changes

__init__(volume, *args, **kwargs)[source]#
Parameters:
  • target (str) – Target node

  • origin (str) – Origin node (default: current node)

  • id (str) – Event ID (default: auto-generated)

  • timestamp (float) – Event timestamp (default: current time)

  • logging_level – Logging level for this event (default: logging.INFO)

  • disable_web_clients_notification – Don’t send a notification of this event to the websocket clients

  • kwargs – Additional arguments for the event