mirror of
https://github.com/esphome/esphome.git
synced 2025-09-14 01:02:19 +01:00
Merge branch 'dev' into multi_device
This commit is contained in:
@@ -3,4 +3,9 @@ substitutions:
|
||||
sda_pin: GPIO17
|
||||
irq_pin: GPIO15
|
||||
|
||||
<<: !include common.yaml
|
||||
packages:
|
||||
as3935: !include common.yaml
|
||||
|
||||
# Trigger issue: https://github.com/esphome/issues/issues/6990
|
||||
# Compile with no binary sensor results in error
|
||||
binary_sensor: !remove
|
||||
|
44
tests/components/const/common.yaml
Normal file
44
tests/components/const/common.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
spi:
|
||||
id: quad_spi
|
||||
clk_pin: 15
|
||||
type: quad
|
||||
data_pins: [14, 10, 16, 12]
|
||||
|
||||
display:
|
||||
- platform: qspi_dbi
|
||||
model: RM690B0
|
||||
data_rate: 80MHz
|
||||
spi_mode: mode0
|
||||
dimensions:
|
||||
width: 450
|
||||
height: 600
|
||||
offset_width: 16
|
||||
color_order: rgb
|
||||
invert_colors: false
|
||||
brightness: 255
|
||||
cs_pin: 11
|
||||
reset_pin: 13
|
||||
enable_pin: 9
|
||||
|
||||
- platform: qspi_dbi
|
||||
model: CUSTOM
|
||||
id: main_lcd
|
||||
draw_from_origin: true
|
||||
dimensions:
|
||||
height: 240
|
||||
width: 536
|
||||
transform:
|
||||
mirror_x: true
|
||||
swap_xy: true
|
||||
color_order: rgb
|
||||
brightness: 255
|
||||
cs_pin: 6
|
||||
reset_pin: 17
|
||||
enable_pin: 38
|
||||
init_sequence:
|
||||
- [0x3A, 0x66]
|
||||
- [0x11]
|
||||
- delay 120ms
|
||||
- [0x29]
|
||||
- delay 20ms
|
||||
|
1
tests/components/const/test.esp32-s3-idf.yaml
Normal file
1
tests/components/const/test.esp32-s3-idf.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
@@ -23,3 +23,9 @@ touchscreen:
|
||||
interrupt_pin: ${interrupt_pin}
|
||||
reset_pin: ${reset_pin}
|
||||
|
||||
binary_sensor:
|
||||
- id: cst226_touch
|
||||
platform: cst226
|
||||
on_press:
|
||||
then:
|
||||
- component.update: ts_cst226
|
||||
|
@@ -1 +1,18 @@
|
||||
debug:
|
||||
|
||||
text_sensor:
|
||||
- platform: debug
|
||||
device:
|
||||
name: "Device Info"
|
||||
reset_reason:
|
||||
name: "Reset Reason"
|
||||
|
||||
sensor:
|
||||
- platform: debug
|
||||
free:
|
||||
name: "Heap Free"
|
||||
loop_time:
|
||||
name: "Loop Time"
|
||||
cpu_frequency:
|
||||
name: "CPU Frequency"
|
||||
|
||||
|
@@ -1 +1,4 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
esp32:
|
||||
cpu_frequency: 240MHz
|
||||
|
@@ -1 +1,4 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
esp32:
|
||||
cpu_frequency: 80MHz
|
||||
|
@@ -1 +1,13 @@
|
||||
<<: !include common.yaml
|
||||
|
||||
esp32:
|
||||
cpu_frequency: 240MHz
|
||||
|
||||
sensor:
|
||||
- platform: debug
|
||||
free:
|
||||
name: "Heap Free"
|
||||
psram:
|
||||
name: "Free PSRAM"
|
||||
|
||||
psram:
|
||||
|
@@ -2,6 +2,7 @@ esp32_ble_server:
|
||||
id: ble_server
|
||||
manufacturer_data: [0x72, 0x4, 0x00, 0x23]
|
||||
manufacturer: ESPHome
|
||||
appearance: 0x1
|
||||
model: Test
|
||||
on_connect:
|
||||
- lambda: |-
|
||||
|
@@ -1,5 +1,4 @@
|
||||
substitutions:
|
||||
verify_ssl: "true"
|
||||
<<: !include http_request.yaml
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
@@ -10,27 +9,30 @@ esphome:
|
||||
then:
|
||||
- http_request.get:
|
||||
url: https://esphome.io
|
||||
headers:
|
||||
request_headers:
|
||||
Content-Type: application/json
|
||||
collect_headers:
|
||||
- age
|
||||
on_error:
|
||||
logger.log: "Request failed"
|
||||
on_response:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "Response status: %d, Duration: %lu ms"
|
||||
format: "Response status: %d, Duration: %lu ms, age: %s"
|
||||
args:
|
||||
- response->status_code
|
||||
- (long) response->duration_ms
|
||||
- response->get_response_header("age").c_str()
|
||||
- http_request.post:
|
||||
url: https://esphome.io
|
||||
headers:
|
||||
request_headers:
|
||||
Content-Type: application/json
|
||||
json:
|
||||
key: value
|
||||
- http_request.send:
|
||||
method: PUT
|
||||
url: https://esphome.io
|
||||
headers:
|
||||
request_headers:
|
||||
Content-Type: application/json
|
||||
body: "Some data"
|
||||
|
||||
|
46
tests/components/http_request/http_request.yaml
Normal file
46
tests/components/http_request/http_request.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
substitutions:
|
||||
verify_ssl: "true"
|
||||
|
||||
network:
|
||||
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- http_request.get:
|
||||
url: https://esphome.io
|
||||
request_headers:
|
||||
Content-Type: application/json
|
||||
on_error:
|
||||
logger.log: "Request failed"
|
||||
on_response:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "Response status: %d, Duration: %lu ms"
|
||||
args:
|
||||
- response->status_code
|
||||
- (long) response->duration_ms
|
||||
- http_request.post:
|
||||
url: https://esphome.io
|
||||
request_headers:
|
||||
Content-Type: application/json
|
||||
json:
|
||||
key: value
|
||||
- http_request.send:
|
||||
method: PUT
|
||||
url: https://esphome.io
|
||||
request_headers:
|
||||
Content-Type: application/json
|
||||
body: "Some data"
|
||||
|
||||
http_request:
|
||||
useragent: esphome/tagreader
|
||||
timeout: 10s
|
||||
verify_ssl: ${verify_ssl}
|
||||
|
||||
script:
|
||||
- id: does_not_compile
|
||||
parameters:
|
||||
api_url: string
|
||||
then:
|
||||
- http_request.get:
|
||||
url: "http://google.com"
|
7
tests/components/http_request/test.host.yaml
Normal file
7
tests/components/http_request/test.host.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
substitutions:
|
||||
verify_ssl: "true"
|
||||
http_request:
|
||||
# Just a file we can be sure exists
|
||||
ca_certificate_path: /etc/passwd
|
||||
|
||||
<<: !include http_request.yaml
|
@@ -69,3 +69,18 @@ image:
|
||||
- id: another_alert_icon
|
||||
file: mdi:alert-outline
|
||||
type: BINARY
|
||||
- file: mdil:arrange-bring-to-front
|
||||
id: mdil_id
|
||||
resize: 50x50
|
||||
type: binary
|
||||
transparency: chroma_key
|
||||
- file: mdi:beer
|
||||
id: mdi_id
|
||||
resize: 50x50
|
||||
type: binary
|
||||
transparency: chroma_key
|
||||
- file: memory:alert-octagon
|
||||
id: memory_id
|
||||
resize: 50x50
|
||||
type: binary
|
||||
transparency: chroma_key
|
||||
|
@@ -134,6 +134,15 @@ lvgl:
|
||||
id: style_test
|
||||
bg_color: blue
|
||||
bg_opa: !lambda return 0.5;
|
||||
- lvgl.image.update:
|
||||
id: lv_image
|
||||
zoom: !lambda return 512;
|
||||
angle: !lambda return 100;
|
||||
pivot_x: !lambda return 20;
|
||||
pivot_y: !lambda return 20;
|
||||
offset_x: !lambda return 20;
|
||||
offset_y: !lambda return 20;
|
||||
antialias: !lambda return true;
|
||||
- id: simple_msgbox
|
||||
title: Simple
|
||||
|
||||
@@ -203,7 +212,7 @@ lvgl:
|
||||
- animimg:
|
||||
height: 60
|
||||
id: anim_img
|
||||
src: [cat_image, dog_image]
|
||||
src: !lambda "return {dog_image, cat_image};"
|
||||
repeat_count: 10
|
||||
duration: 1s
|
||||
auto_start: true
|
||||
@@ -215,6 +224,7 @@ lvgl:
|
||||
id: anim_img
|
||||
src: !lambda "return {dog_image, cat_image};"
|
||||
duration: 2s
|
||||
- lvgl.widget.refresh: anim_img
|
||||
- label:
|
||||
on_boot:
|
||||
lvgl.label.update:
|
||||
@@ -486,6 +496,8 @@ lvgl:
|
||||
align: top_left
|
||||
y: "50"
|
||||
mode: real
|
||||
zoom: 2.0
|
||||
angle: 45
|
||||
- tileview:
|
||||
id: tileview_id
|
||||
scrollbar_mode: active
|
||||
@@ -641,6 +653,8 @@ lvgl:
|
||||
knob:
|
||||
radius: 1
|
||||
width: "4"
|
||||
pad_left: -5
|
||||
pad_top: 5
|
||||
height: 10%
|
||||
bg_color: 0x000000
|
||||
width: 100%
|
||||
|
@@ -4,3 +4,10 @@ wifi:
|
||||
|
||||
mdns:
|
||||
disabled: false
|
||||
services:
|
||||
- service: _test_service
|
||||
protocol: _tcp
|
||||
port: 8888
|
||||
txt:
|
||||
static_string: Anything
|
||||
templated_string: !lambda return "Something else";
|
||||
|
@@ -8,12 +8,30 @@ microphone:
|
||||
i2s_din_pin: GPIO17
|
||||
adc_type: external
|
||||
pdm: true
|
||||
bits_per_sample: 16bit
|
||||
|
||||
micro_wake_word:
|
||||
microphone: echo_microphone
|
||||
on_wake_word_detected:
|
||||
- logger.log: "Wake word detected"
|
||||
- micro_wake_word.stop:
|
||||
- if:
|
||||
condition:
|
||||
- micro_wake_word.model_is_enabled: hey_jarvis_model
|
||||
then:
|
||||
- micro_wake_word.disable_model: hey_jarvis_model
|
||||
else:
|
||||
- micro_wake_word.enable_model: hey_jarvis_model
|
||||
- if:
|
||||
condition:
|
||||
- not:
|
||||
- micro_wake_word.is_running:
|
||||
then:
|
||||
micro_wake_word.start:
|
||||
stop_after_detection: false
|
||||
models:
|
||||
- model: hey_jarvis
|
||||
probability_cutoff: 0.7
|
||||
id: hey_jarvis_model
|
||||
- model: okay_nabu
|
||||
sliding_window_size: 5
|
||||
|
@@ -9,3 +9,12 @@ microphone:
|
||||
i2s_din_pin: ${i2s_din_pin}
|
||||
adc_type: external
|
||||
pdm: false
|
||||
mclk_multiple: 384
|
||||
on_data:
|
||||
- if:
|
||||
condition:
|
||||
- microphone.is_muted:
|
||||
then:
|
||||
- microphone.unmute:
|
||||
else:
|
||||
- microphone.mute:
|
||||
|
@@ -4,9 +4,18 @@ substitutions:
|
||||
i2s_mclk_pin: GPIO17
|
||||
i2s_din_pin: GPIO33
|
||||
|
||||
<<: !include common.yaml
|
||||
i2s_audio:
|
||||
i2s_bclk_pin: ${i2s_bclk_pin}
|
||||
i2s_lrclk_pin: ${i2s_lrclk_pin}
|
||||
i2s_mclk_pin: ${i2s_mclk_pin}
|
||||
use_legacy: true
|
||||
|
||||
microphone:
|
||||
- platform: i2s_audio
|
||||
id: mic_id_external
|
||||
i2s_din_pin: ${i2s_din_pin}
|
||||
adc_type: external
|
||||
pdm: false
|
||||
- platform: i2s_audio
|
||||
id: mic_id_adc
|
||||
adc_pin: 32
|
||||
|
@@ -5,8 +5,7 @@ i2c:
|
||||
|
||||
sensor:
|
||||
- platform: mlx90393
|
||||
oversampling: 1
|
||||
filter: 0
|
||||
oversampling: 3
|
||||
gain: 1X
|
||||
temperature_compensation: true
|
||||
x_axis:
|
||||
|
@@ -280,6 +280,7 @@ display:
|
||||
- platform: nextion
|
||||
id: main_lcd
|
||||
update_interval: 5s
|
||||
command_spacing: 5ms
|
||||
on_sleep:
|
||||
then:
|
||||
lambda: 'ESP_LOGD("display","Display went to sleep");'
|
||||
|
3
tests/components/packages/package.yaml
Normal file
3
tests/components/packages/package.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
sensor:
|
||||
- platform: template
|
||||
id: package_sensor
|
11
tests/components/packages/test.esp32-ard.yaml
Normal file
11
tests/components/packages/test.esp32-ard.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
packages:
|
||||
- sensor:
|
||||
- platform: template
|
||||
id: inline_sensor
|
||||
- !include package.yaml
|
||||
- github://esphome/esphome/tests/components/template/common.yaml@dev
|
||||
- url: https://github.com/esphome/esphome
|
||||
file: tests/components/binary_sensor_map/common.yaml
|
||||
ref: dev
|
||||
refresh: 1d
|
||||
|
13
tests/components/packages/test.esp32-idf.yaml
Normal file
13
tests/components/packages/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
packages:
|
||||
sensor:
|
||||
sensor:
|
||||
- platform: template
|
||||
id: inline_sensor
|
||||
local: !include package.yaml
|
||||
shorthand: github://esphome/esphome/tests/components/template/common.yaml@dev
|
||||
github:
|
||||
url: https://github.com/esphome/esphome
|
||||
file: tests/components/binary_sensor_map/common.yaml
|
||||
ref: dev
|
||||
refresh: 1d
|
||||
|
40
tests/components/packet_transport/common.yaml
Normal file
40
tests/components/packet_transport/common.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
udp:
|
||||
listen_address: 239.0.60.53
|
||||
addresses: ["239.0.60.53"]
|
||||
|
||||
packet_transport:
|
||||
platform: udp
|
||||
update_interval: 5s
|
||||
encryption: "our key goes here"
|
||||
rolling_code_enable: true
|
||||
ping_pong_enable: true
|
||||
binary_sensors:
|
||||
- binary_sensor_id1
|
||||
- id: binary_sensor_id1
|
||||
broadcast_id: other_id
|
||||
sensors:
|
||||
- sensor_id1
|
||||
- id: sensor_id1
|
||||
broadcast_id: other_id
|
||||
providers:
|
||||
- name: some-device-name
|
||||
encryption: "their key goes here"
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
id: sensor_id1
|
||||
- platform: packet_transport
|
||||
provider: some-device-name
|
||||
id: our_id
|
||||
remote_id: some_sensor_id
|
||||
|
||||
binary_sensor:
|
||||
- platform: packet_transport
|
||||
provider: unencrypted-device
|
||||
id: other_binary_sensor_id
|
||||
- platform: template
|
||||
id: binary_sensor_id1
|
1
tests/components/packet_transport/test.bk72xx-ard.yaml
Normal file
1
tests/components/packet_transport/test.bk72xx-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/packet_transport/test.esp32-ard.yaml
Normal file
1
tests/components/packet_transport/test.esp32-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/packet_transport/test.esp32-c3-ard.yaml
Normal file
1
tests/components/packet_transport/test.esp32-c3-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/packet_transport/test.esp32-c3-idf.yaml
Normal file
1
tests/components/packet_transport/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/packet_transport/test.esp32-idf.yaml
Normal file
1
tests/components/packet_transport/test.esp32-idf.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/packet_transport/test.esp8266-ard.yaml
Normal file
1
tests/components/packet_transport/test.esp8266-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
4
tests/components/packet_transport/test.host.yaml
Normal file
4
tests/components/packet_transport/test.host.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
wifi: !remove
|
1
tests/components/packet_transport/test.rp2040-ard.yaml
Normal file
1
tests/components/packet_transport/test.rp2040-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
@@ -3,6 +3,11 @@ on_abbwelcome:
|
||||
- logger.log:
|
||||
format: "on_abbwelcome: %u"
|
||||
args: ["x.data()[0]"]
|
||||
on_beo4:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "on_beo4: %u %u"
|
||||
args: ["x.source", "x.command"]
|
||||
on_aeha:
|
||||
then:
|
||||
- logger.log:
|
||||
@@ -43,6 +48,11 @@ on_drayton:
|
||||
- logger.log:
|
||||
format: "on_drayton: %u %u %u"
|
||||
args: ["x.address", "x.channel", "x.command"]
|
||||
on_gobox:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "on_gobox: %d"
|
||||
args: ["x.code"]
|
||||
on_jvc:
|
||||
then:
|
||||
- logger.log:
|
||||
|
@@ -1,4 +1,11 @@
|
||||
button:
|
||||
- platform: template
|
||||
name: Beo4 audio mute
|
||||
id: beo4_audio_mute
|
||||
on_press:
|
||||
remote_transmitter.transmit_beo4:
|
||||
source: 0x01
|
||||
command: 0x0C
|
||||
- platform: template
|
||||
name: JVC Off
|
||||
id: living_room_lights_on
|
||||
|
15
tests/components/syslog/common.yaml
Normal file
15
tests/components/syslog/common.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
udp:
|
||||
addresses: ["239.0.60.53"]
|
||||
|
||||
time:
|
||||
platform: host
|
||||
|
||||
syslog:
|
||||
port: 514
|
||||
strip: true
|
||||
level: info
|
||||
facility: 16
|
1
tests/components/syslog/test.bk72xx-ard.yaml
Normal file
1
tests/components/syslog/test.bk72xx-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/syslog/test.esp32-ard.yaml
Normal file
1
tests/components/syslog/test.esp32-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/syslog/test.esp32-c3-ard.yaml
Normal file
1
tests/components/syslog/test.esp32-c3-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/syslog/test.esp32-c3-idf.yaml
Normal file
1
tests/components/syslog/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/syslog/test.esp32-idf.yaml
Normal file
1
tests/components/syslog/test.esp32-idf.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
1
tests/components/syslog/test.esp8266-ard.yaml
Normal file
1
tests/components/syslog/test.esp8266-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
4
tests/components/syslog/test.host.yaml
Normal file
4
tests/components/syslog/test.host.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
||||
|
||||
wifi: !remove
|
1
tests/components/syslog/test.rp2040-ard.yaml
Normal file
1
tests/components/syslog/test.rp2040-ard.yaml
Normal file
@@ -0,0 +1 @@
|
||||
<<: !include common.yaml
|
@@ -28,6 +28,16 @@ sensor:
|
||||
value: 20.0
|
||||
- timeout:
|
||||
timeout: 1d
|
||||
- to_ntc_resistance:
|
||||
calibration:
|
||||
- 10.0kOhm -> 25°C
|
||||
- 27.219kOhm -> 0°C
|
||||
- 14.674kOhm -> 15°C
|
||||
- to_ntc_temperature:
|
||||
calibration:
|
||||
- 10.0kOhm -> 25°C
|
||||
- 27.219kOhm -> 0°C
|
||||
- 14.674kOhm -> 15°C
|
||||
|
||||
esphome:
|
||||
on_boot:
|
||||
|
@@ -13,3 +13,6 @@ uart:
|
||||
rx_buffer_size: 512
|
||||
parity: EVEN
|
||||
stop_bits: 2
|
||||
|
||||
packet_transport:
|
||||
- platform: uart
|
||||
|
@@ -3,34 +3,18 @@ wifi:
|
||||
password: password1
|
||||
|
||||
udp:
|
||||
update_interval: 5s
|
||||
encryption: "our key goes here"
|
||||
rolling_code_enable: true
|
||||
ping_pong_enable: true
|
||||
id: my_udp
|
||||
listen_address: 239.0.60.53
|
||||
binary_sensors:
|
||||
- binary_sensor_id1
|
||||
- id: binary_sensor_id1
|
||||
broadcast_id: other_id
|
||||
sensors:
|
||||
- sensor_id1
|
||||
- id: sensor_id1
|
||||
broadcast_id: other_id
|
||||
providers:
|
||||
- name: some-device-name
|
||||
encryption: "their key goes here"
|
||||
addresses: ["239.0.60.53"]
|
||||
on_receive:
|
||||
- logger.log:
|
||||
format: "Received %d bytes"
|
||||
args: [data.size()]
|
||||
- udp.write:
|
||||
id: my_udp
|
||||
data: "hello world"
|
||||
- udp.write:
|
||||
id: my_udp
|
||||
data: !lambda |-
|
||||
return std::vector<uint8_t>{1,3,4,5,6};
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
id: sensor_id1
|
||||
- platform: udp
|
||||
provider: some-device-name
|
||||
id: our_id
|
||||
remote_id: some_sensor_id
|
||||
|
||||
binary_sensor:
|
||||
- platform: udp
|
||||
provider: unencrypted-device
|
||||
id: other_binary_sensor_id
|
||||
- platform: template
|
||||
id: binary_sensor_id1
|
||||
|
@@ -10,3 +10,4 @@ sensor:
|
||||
enable_pin: 3
|
||||
timeout: 200us
|
||||
update_interval: 60s
|
||||
timing_budget: 30000us
|
||||
|
69
tests/components/voice_assistant/common-idf.yaml
Normal file
69
tests/components/voice_assistant/common-idf.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
esphome:
|
||||
on_boot:
|
||||
then:
|
||||
- voice_assistant.start
|
||||
- voice_assistant.start_continuous
|
||||
- voice_assistant.stop
|
||||
|
||||
wifi:
|
||||
ssid: MySSID
|
||||
password: password1
|
||||
|
||||
api:
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: ${i2s_lrclk_pin}
|
||||
i2s_bclk_pin: ${i2s_bclk_pin}
|
||||
i2s_mclk_pin: ${i2s_mclk_pin}
|
||||
|
||||
micro_wake_word:
|
||||
id: mww_id
|
||||
on_wake_word_detected:
|
||||
- voice_assistant.start:
|
||||
wake_word: !lambda return wake_word;
|
||||
models:
|
||||
- model: okay_nabu
|
||||
|
||||
microphone:
|
||||
- platform: i2s_audio
|
||||
id: mic_id_external
|
||||
i2s_din_pin: ${i2s_din_pin}
|
||||
adc_type: external
|
||||
pdm: false
|
||||
|
||||
speaker:
|
||||
- platform: i2s_audio
|
||||
id: speaker_id
|
||||
dac_type: external
|
||||
i2s_dout_pin: ${i2s_dout_pin}
|
||||
|
||||
voice_assistant:
|
||||
microphone:
|
||||
microphone: mic_id_external
|
||||
gain_factor: 4
|
||||
channels: 0
|
||||
speaker: speaker_id
|
||||
micro_wake_word: mww_id
|
||||
conversation_timeout: 60s
|
||||
on_listening:
|
||||
- logger.log: "Voice assistant microphone listening"
|
||||
on_start:
|
||||
- logger.log: "Voice assistant started"
|
||||
on_stt_end:
|
||||
- logger.log:
|
||||
format: "Voice assistant STT ended with result %s"
|
||||
args: [x.c_str()]
|
||||
on_tts_start:
|
||||
- logger.log:
|
||||
format: "Voice assistant TTS started with text %s"
|
||||
args: [x.c_str()]
|
||||
on_tts_end:
|
||||
- logger.log:
|
||||
format: "Voice assistant TTS ended with url %s"
|
||||
args: [x.c_str()]
|
||||
on_end:
|
||||
- logger.log: "Voice assistant ended"
|
||||
on_error:
|
||||
- logger.log:
|
||||
format: "Voice assistant error - code %s, message: %s"
|
||||
args: [code.c_str(), message.c_str()]
|
@@ -30,7 +30,10 @@ speaker:
|
||||
i2s_dout_pin: ${i2s_dout_pin}
|
||||
|
||||
voice_assistant:
|
||||
microphone: mic_id_external
|
||||
microphone:
|
||||
microphone: mic_id_external
|
||||
gain_factor: 4
|
||||
channels: 0
|
||||
speaker: speaker_id
|
||||
conversation_timeout: 60s
|
||||
on_listening:
|
||||
|
@@ -5,4 +5,4 @@ substitutions:
|
||||
i2s_din_pin: GPIO3
|
||||
i2s_dout_pin: GPIO2
|
||||
|
||||
<<: !include common.yaml
|
||||
<<: !include common-idf.yaml
|
||||
|
@@ -5,4 +5,4 @@ substitutions:
|
||||
i2s_din_pin: GPIO13
|
||||
i2s_dout_pin: GPIO12
|
||||
|
||||
<<: !include common.yaml
|
||||
<<: !include common-idf.yaml
|
||||
|
Reference in New Issue
Block a user