update docs

This commit is contained in:
Nitwel 2024-03-18 13:30:37 +01:00
parent b083aef5ae
commit c3dfc0c24f
6 changed files with 99 additions and 45 deletions

View File

@ -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 = `<Object>` {#const-VoiceAssistant}
No description provided yet.
### apis = `{"hass": <Object>, "hass_ws": <Object>}` {#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

View File

@ -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.

View File

@ -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 = `<Object>` {#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.

View File

@ -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.

View File

@ -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.

View File

@ -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.