From c3dfc0c24f7895450856615ce1dca6cd42cd4789 Mon Sep 17 00:00:00 2001 From: Nitwel Date: Mon, 18 Mar 2024 13:30:37 +0100 Subject: [PATCH] update docs --- docs/reference/lib--globals--home_api.md | 24 +++++++-- docs/reference/lib--globals--main_store.md | 16 +++--- ...b--home_apis--hass_ws--handlers--assist.md | 31 ++--------- .../lib--home_apis--hass_ws--hass.md | 5 ++ .../lib--home_apis--voice_handler.md | 51 +++++++++++++++++++ docs/reference/lib--stores--settings.md | 17 ++++--- 6 files changed, 99 insertions(+), 45 deletions(-) create mode 100644 docs/reference/lib--home_apis--voice_handler.md diff --git a/docs/reference/lib--globals--home_api.md b/docs/reference/lib--globals--home_api.md index 3a1faf4..2af0683 100644 --- a/docs/reference/lib--globals--home_api.md +++ b/docs/reference/lib--globals--home_api.md @@ -15,16 +15,18 @@ Manages the connection to the home automation system and provides a unified inte | Returns | Name | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| void | [_notification](#-notification) ( what: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) | | void | [_on_connect](#-on-connect) ( ) | | void | [_on_disconnect](#-on-disconnect) ( ) | | void | [_ready](#-ready) ( ) | | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [get_device](#get-device) ( id: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) | | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [get_devices](#get-devices) ( ) | | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [get_state](#get-state) ( entity: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) | +| [VoiceHandler](/reference/lib--home_apis--voice_handler.html) | [get_voice_assistant](#get-voice-assistant) ( ) | | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [has_connected](#has-connected) ( ) | +| [bool](https://docs.godotengine.org/de/4.x/classes/class_bool.html) | [has_integration](#has-integration) ( ) | | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [set_state](#set-state) ( entity: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html), state: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html), attributes: [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html) ) | | void | [start_adapter](#start-adapter) ( type: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html), url: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html), token: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) | +| void | [update_room](#update-room) ( room: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) | | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [watch_state](#watch-state) ( entity: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html), callback: [Callable](https://docs.godotengine.org/de/4.x/classes/class_callable.html) ) | ## Signals @@ -49,6 +51,10 @@ No description provided yet. No description provided yet. +### VoiceAssistant = `` {#const-VoiceAssistant} + +No description provided yet. + ### apis = `{"hass": , "hass_ws": }` {#const-apis} No description provided yet. @@ -71,10 +77,6 @@ The current home automation system adapter ## Method Descriptions -### _notification (what: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) -> void {#-notification} - -No description provided yet. - ### _on_connect ( ) -> void {#-on-connect} No description provided yet. @@ -99,10 +101,18 @@ Get a list of all devices Returns the current state of an entity +### get_voice_assistant ( ) -> [VoiceHandler](/reference/lib--home_apis--voice_handler.html) {#get-voice-assistant} + +Returns the VoiceHandler if the adapter has a voice assistant + ### has_connected ( ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#has-connected} Returns true if the adapter is connected to the home automation system +### has_integration ( ) -> [bool](https://docs.godotengine.org/de/4.x/classes/class_bool.html) {#has-integration} + +Returns true if the adapter has an integration in the home automation system allowing to send the room position of the headset. + ### set_state (entity: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) , state: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) , attributes: [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html) ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#set-state} Updates the state of the entity and returns the resulting state @@ -111,6 +121,10 @@ Updates the state of the entity and returns the resulting state Starts the adapter for the given type and url +### update_room (room: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) -> void {#update-room} + +Updates the room position of the headset in the home automation system + ### watch_state (entity: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) , callback: [Callable](https://docs.godotengine.org/de/4.x/classes/class_callable.html) ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#watch-state} Watches the state and each time it changes, calls the callback with the changed state, returns a function to stop watching the state diff --git a/docs/reference/lib--globals--main_store.md b/docs/reference/lib--globals--main_store.md index e9863c4..fe79453 100644 --- a/docs/reference/lib--globals--main_store.md +++ b/docs/reference/lib--globals--main_store.md @@ -7,11 +7,11 @@ Collection of all the stores to save the state persistently ## Properties -| Name | Type | Default | -| -------------------------- | ------------------------------------------------------------------------- | ------- | -| [devices](#prop-devices) | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | | -| [house](#prop-house) | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | | -| [settings](#prop-settings) | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | | +| Name | Type | Default | +| -------------------------- | ------------------------------------------------- | ------- | +| [devices](#prop-devices) | [Devices](/reference/lib--stores--devices.html) | | +| [house](#prop-house) | [House](/reference/lib--stores--house.html) | | +| [settings](#prop-settings) | [Settings](/reference/lib--stores--settings.html) | | @@ -35,14 +35,14 @@ No description provided yet. ## Property Descriptions -### devices: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#prop-devices} +### devices: [Devices](/reference/lib--stores--devices.html) {#prop-devices} No description provided yet. -### house: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#prop-house} +### house: [House](/reference/lib--stores--house.html) {#prop-house} No description provided yet. -### settings: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#prop-settings} +### settings: [Settings](/reference/lib--stores--settings.html) {#prop-settings} No description provided yet. diff --git a/docs/reference/lib--home_apis--hass_ws--handlers--assist.md b/docs/reference/lib--home_apis--hass_ws--handlers--assist.md index 640d58d..6ea10f6 100644 --- a/docs/reference/lib--home_apis--hass_ws--handlers--assist.md +++ b/docs/reference/lib--home_apis--hass_ws--handlers--assist.md @@ -1,5 +1,5 @@ # Assist -**Inherits:** [RefCounted](https://docs.godotengine.org/de/4.x/classes/class_refcounted.html) +**Inherits:** [VoiceHandler](/reference/lib--home_apis--voice_handler.html) @@ -21,31 +21,10 @@ | ------- | ------------------------------------------------------------------------------------------------------------------------------ | | void | [_init](#-init) ( hass: [Hass](/reference/lib--home_apis--hass_ws--hass.html) ) | | void | [handle_message](#handle-message) ( message: [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html) ) | -| void | [on_connect](#on-connect) ( ) | | void | [send_data](#send-data) ( data: [PackedByteArray](https://docs.godotengine.org/de/4.x/classes/class_packedbytearray.html) ) | | void | [start_wakeword](#start-wakeword) ( ) | -## Signals -### on_error ( ) {#on-error} - -No description provided yet. - -### on_stt_message (message: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) {#on-stt-message} - -No description provided yet. - -### on_tts_message (message: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) {#on-tts-message} - -No description provided yet. - -### on_tts_sound (sound: [AudioStreamMP3](https://docs.godotengine.org/de/4.x/classes/class_audiostreammp3.html) ) {#on-tts-sound} - -No description provided yet. - -### on_wake_word (wake_word: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) {#on-wake-word} - -No description provided yet. @@ -55,6 +34,10 @@ No description provided yet. No description provided yet. +### VoiceHandler = `` {#const-VoiceHandler} + +No description provided yet. + ## Property Descriptions ### api: [Hass](/reference/lib--home_apis--hass_ws--hass.html) {#prop-api} @@ -95,10 +78,6 @@ No description provided yet. No description provided yet. -### on_connect ( ) -> void {#on-connect} - -No description provided yet. - ### send_data (data: [PackedByteArray](https://docs.godotengine.org/de/4.x/classes/class_packedbytearray.html) ) -> void {#send-data} No description provided yet. diff --git a/docs/reference/lib--home_apis--hass_ws--hass.md b/docs/reference/lib--home_apis--hass_ws--hass.md index 28cfb3b..d060a05 100644 --- a/docs/reference/lib--home_apis--hass_ws--hass.md +++ b/docs/reference/lib--home_apis--hass_ws--hass.md @@ -34,6 +34,7 @@ | void | [get_device](#get-device) ( id: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) | | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [get_devices](#get-devices) ( ) | | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [get_state](#get-state) ( entity: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) | +| [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [get_voice_assistant](#get-voice-assistant) ( ) | | void | [handle_connect](#handle-connect) ( ) | | void | [handle_disconnect](#handle-disconnect) ( ) | | void | [handle_packet](#handle-packet) ( packet: [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html) ) | @@ -166,6 +167,10 @@ No description provided yet. No description provided yet. +### get_voice_assistant ( ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#get-voice-assistant} + +No description provided yet. + ### handle_connect ( ) -> void {#handle-connect} No description provided yet. diff --git a/docs/reference/lib--home_apis--voice_handler.md b/docs/reference/lib--home_apis--voice_handler.md new file mode 100644 index 0000000..a135193 --- /dev/null +++ b/docs/reference/lib--home_apis--voice_handler.md @@ -0,0 +1,51 @@ +# VoiceHandler +**Inherits:** [RefCounted](https://docs.godotengine.org/de/4.x/classes/class_refcounted.html) + + + + + +## Methods + +| Returns | Name | +| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| void | [send_data](#send-data) ( data: [PackedByteArray](https://docs.godotengine.org/de/4.x/classes/class_packedbytearray.html) ) | +| [bool](https://docs.godotengine.org/de/4.x/classes/class_bool.html) | [start_wakeword](#start-wakeword) ( ) | + +## Signals + +### on_error ( ) {#on-error} + +No description provided yet. + +### on_stt_message (message: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) {#on-stt-message} + +No description provided yet. + +### on_tts_message (message: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) {#on-tts-message} + +No description provided yet. + +### on_tts_sound (sound: [AudioStreamMP3](https://docs.godotengine.org/de/4.x/classes/class_audiostreammp3.html) ) {#on-tts-sound} + +No description provided yet. + +### on_wake_word (wake_word: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) ) {#on-wake-word} + +No description provided yet. + + + + + + + +## Method Descriptions + +### send_data (data: [PackedByteArray](https://docs.godotengine.org/de/4.x/classes/class_packedbytearray.html) ) -> void {#send-data} + +No description provided yet. + +### start_wakeword ( ) -> [bool](https://docs.godotengine.org/de/4.x/classes/class_bool.html) {#start-wakeword} + +No description provided yet. diff --git a/docs/reference/lib--stores--settings.md b/docs/reference/lib--stores--settings.md index 66b6629..0507172 100644 --- a/docs/reference/lib--stores--settings.md +++ b/docs/reference/lib--stores--settings.md @@ -7,12 +7,13 @@ Stores general settings for the app ## Properties -| Name | Type | Default | -| ---------------------------------------- | ----------------------------------------------------------------------- | ----------- | -| [token](#prop-token) | [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) | `""` | -| [type](#prop-type) | [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) | `"HASS_WS"` | -| [url](#prop-url) | [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) | `""` | -| [voice_assistant](#prop-voice-assistant) | [bool](https://docs.godotengine.org/de/4.x/classes/class_bool.html) | `false` | +| Name | Type | Default | +| ------------------------------------------------ | ----------------------------------------------------------------------- | ----------- | +| [onboarding_complete](#prop-onboarding-complete) | [bool](https://docs.godotengine.org/de/4.x/classes/class_bool.html) | `false` | +| [token](#prop-token) | [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) | `""` | +| [type](#prop-type) | [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) | `"HASS_WS"` | +| [url](#prop-url) | [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) | `""` | +| [voice_assistant](#prop-voice-assistant) | [bool](https://docs.godotengine.org/de/4.x/classes/class_bool.html) | `false` | ## Methods @@ -33,6 +34,10 @@ No description provided yet. ## Property Descriptions +### onboarding_complete: [bool](https://docs.godotengine.org/de/4.x/classes/class_bool.html) {#prop-onboarding-complete} + +If the onboarding process has been completed + ### token: [String](https://docs.godotengine.org/de/4.x/classes/class_string.html) {#prop-token} No description provided yet.