Improve startup of VA
This commit is contained in:
@ -37,6 +37,12 @@ esphome:
|
|||||||
- light.turn_on:
|
- light.turn_on:
|
||||||
id: output_led
|
id: output_led
|
||||||
effect: flash_white
|
effect: flash_white
|
||||||
|
- priority: -600
|
||||||
|
then:
|
||||||
|
- wait_until:
|
||||||
|
api.connected:
|
||||||
|
- delay: 5s
|
||||||
|
- switch.turn_on: use_wake_word
|
||||||
|
|
||||||
dashboard_import:
|
dashboard_import:
|
||||||
package_import_url: github://joshuaboniface/supersensor/supersensor.yaml
|
package_import_url: github://joshuaboniface/supersensor/supersensor.yaml
|
||||||
@ -205,7 +211,6 @@ api:
|
|||||||
- logger.log:
|
- logger.log:
|
||||||
format: "Client %s connected to API with IP %s"
|
format: "Client %s connected to API with IP %s"
|
||||||
args: ["client_info.c_str()", "client_address.c_str()"]
|
args: ["client_info.c_str()", "client_address.c_str()"]
|
||||||
- switch.turn_on: use_wake_word
|
|
||||||
on_client_disconnected:
|
on_client_disconnected:
|
||||||
- logger.log:
|
- logger.log:
|
||||||
format: "Client %s connected to API with IP %s"
|
format: "Client %s connected to API with IP %s"
|
||||||
@ -225,8 +230,7 @@ wifi:
|
|||||||
ssid: !secret wifi_ssid
|
ssid: !secret wifi_ssid
|
||||||
password: !secret wifi_password
|
password: !secret wifi_password
|
||||||
domain: !secret wifi_domain
|
domain: !secret wifi_domain
|
||||||
power_save_mode: LIGHT
|
reboot_timeout: 15min
|
||||||
reboot_timeout: 5min
|
|
||||||
|
|
||||||
uart:
|
uart:
|
||||||
id: ld2410_uart
|
id: ld2410_uart
|
||||||
@ -254,37 +258,41 @@ microphone:
|
|||||||
pdm: false
|
pdm: false
|
||||||
|
|
||||||
interval:
|
interval:
|
||||||
- interval: 1s
|
- interval: 5s
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
condition: voice_assistant.is_running
|
condition:
|
||||||
|
and:
|
||||||
|
- switch.is_on: use_wake_word
|
||||||
|
- not: voice_assistant.is_running
|
||||||
then:
|
then:
|
||||||
- logger.log: "voice assistant state: running"
|
|
||||||
else:
|
|
||||||
- logger.log: "voice assistant state: not running"
|
- logger.log: "voice assistant state: not running"
|
||||||
- if:
|
- voice_assistant.start_continuous:
|
||||||
condition: voice_assistant.connected
|
|
||||||
then:
|
|
||||||
- logger.log: "voice assistant state: connected"
|
|
||||||
else:
|
|
||||||
- logger.log: "voice assistant state: not connected"
|
|
||||||
|
|
||||||
voice_assistant:
|
voice_assistant:
|
||||||
microphone: mic
|
microphone: mic
|
||||||
use_wake_word: false
|
use_wake_word: false
|
||||||
noise_suppression_level: 2
|
noise_suppression_level: 1
|
||||||
auto_gain: 31dBFS
|
auto_gain: 31dBFS
|
||||||
volume_multiplier: 4.0
|
volume_multiplier: 7.0
|
||||||
id: assist
|
id: assist
|
||||||
on_error:
|
on_error:
|
||||||
|
- logger.log: "voice error"
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
switch.is_on: use_wake_word
|
||||||
|
then:
|
||||||
- voice_assistant.stop:
|
- voice_assistant.stop:
|
||||||
|
- delay: 1s
|
||||||
- voice_assistant.start_continuous:
|
- voice_assistant.start_continuous:
|
||||||
on_end:
|
on_end:
|
||||||
- logger.log: "voice ended"
|
- logger.log: "voice ended"
|
||||||
on_client_connected:
|
on_client_connected:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
switch.is_on: use_wake_word
|
and:
|
||||||
|
- switch.is_on: use_wake_word
|
||||||
|
- not: voice_assistant.is_running
|
||||||
then:
|
then:
|
||||||
- voice_assistant.start_continuous:
|
- voice_assistant.start_continuous:
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
|
Reference in New Issue
Block a user