mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 06:58:11 +01:00
Add some components to the new testing framework (V) (#6231)
This commit is contained in:
parent
cb731926be
commit
d5a8bea8e9
28 changed files with 660 additions and 0 deletions
42
tests/components/vbus/test.esp32-c3-idf.yaml
Normal file
42
tests/components/vbus/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
uart:
|
||||||
|
- id: uart_vbus
|
||||||
|
tx_pin: 4
|
||||||
|
rx_pin: 5
|
||||||
|
baud_rate: 9600
|
||||||
|
|
||||||
|
vbus:
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol_bs_plus
|
||||||
|
relay1:
|
||||||
|
name: Relay 1 On
|
||||||
|
relay2:
|
||||||
|
name: Relay 2 On
|
||||||
|
sensor1_error:
|
||||||
|
name: Sensor 1 Error
|
||||||
|
- platform: vbus
|
||||||
|
model: custom
|
||||||
|
command: 0x100
|
||||||
|
source: 0x1234
|
||||||
|
dest: 0x10
|
||||||
|
binary_sensors:
|
||||||
|
- id: vcustom_b
|
||||||
|
name: VBus Custom Binary Sensor
|
||||||
|
lambda: return x[0] & 1;
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol c
|
||||||
|
temperature_1:
|
||||||
|
name: Temperature 1
|
||||||
|
temperature_2:
|
||||||
|
name: Temperature 2
|
||||||
|
temperature_3:
|
||||||
|
name: Temperature 3
|
||||||
|
operating_hours_1:
|
||||||
|
name: Operating Hours 1
|
||||||
|
heat_quantity:
|
||||||
|
name: Heat Quantity
|
||||||
|
time:
|
||||||
|
name: System Time
|
42
tests/components/vbus/test.esp32-c3.yaml
Normal file
42
tests/components/vbus/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
uart:
|
||||||
|
- id: uart_vbus
|
||||||
|
tx_pin: 4
|
||||||
|
rx_pin: 5
|
||||||
|
baud_rate: 9600
|
||||||
|
|
||||||
|
vbus:
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol_bs_plus
|
||||||
|
relay1:
|
||||||
|
name: Relay 1 On
|
||||||
|
relay2:
|
||||||
|
name: Relay 2 On
|
||||||
|
sensor1_error:
|
||||||
|
name: Sensor 1 Error
|
||||||
|
- platform: vbus
|
||||||
|
model: custom
|
||||||
|
command: 0x100
|
||||||
|
source: 0x1234
|
||||||
|
dest: 0x10
|
||||||
|
binary_sensors:
|
||||||
|
- id: vcustom_b
|
||||||
|
name: VBus Custom Binary Sensor
|
||||||
|
lambda: return x[0] & 1;
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol c
|
||||||
|
temperature_1:
|
||||||
|
name: Temperature 1
|
||||||
|
temperature_2:
|
||||||
|
name: Temperature 2
|
||||||
|
temperature_3:
|
||||||
|
name: Temperature 3
|
||||||
|
operating_hours_1:
|
||||||
|
name: Operating Hours 1
|
||||||
|
heat_quantity:
|
||||||
|
name: Heat Quantity
|
||||||
|
time:
|
||||||
|
name: System Time
|
42
tests/components/vbus/test.esp32-idf.yaml
Normal file
42
tests/components/vbus/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
uart:
|
||||||
|
- id: uart_vbus
|
||||||
|
tx_pin: 17
|
||||||
|
rx_pin: 16
|
||||||
|
baud_rate: 9600
|
||||||
|
|
||||||
|
vbus:
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol_bs_plus
|
||||||
|
relay1:
|
||||||
|
name: Relay 1 On
|
||||||
|
relay2:
|
||||||
|
name: Relay 2 On
|
||||||
|
sensor1_error:
|
||||||
|
name: Sensor 1 Error
|
||||||
|
- platform: vbus
|
||||||
|
model: custom
|
||||||
|
command: 0x100
|
||||||
|
source: 0x1234
|
||||||
|
dest: 0x10
|
||||||
|
binary_sensors:
|
||||||
|
- id: vcustom_b
|
||||||
|
name: VBus Custom Binary Sensor
|
||||||
|
lambda: return x[0] & 1;
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol c
|
||||||
|
temperature_1:
|
||||||
|
name: Temperature 1
|
||||||
|
temperature_2:
|
||||||
|
name: Temperature 2
|
||||||
|
temperature_3:
|
||||||
|
name: Temperature 3
|
||||||
|
operating_hours_1:
|
||||||
|
name: Operating Hours 1
|
||||||
|
heat_quantity:
|
||||||
|
name: Heat Quantity
|
||||||
|
time:
|
||||||
|
name: System Time
|
42
tests/components/vbus/test.esp32.yaml
Normal file
42
tests/components/vbus/test.esp32.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
uart:
|
||||||
|
- id: uart_vbus
|
||||||
|
tx_pin: 17
|
||||||
|
rx_pin: 16
|
||||||
|
baud_rate: 9600
|
||||||
|
|
||||||
|
vbus:
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol_bs_plus
|
||||||
|
relay1:
|
||||||
|
name: Relay 1 On
|
||||||
|
relay2:
|
||||||
|
name: Relay 2 On
|
||||||
|
sensor1_error:
|
||||||
|
name: Sensor 1 Error
|
||||||
|
- platform: vbus
|
||||||
|
model: custom
|
||||||
|
command: 0x100
|
||||||
|
source: 0x1234
|
||||||
|
dest: 0x10
|
||||||
|
binary_sensors:
|
||||||
|
- id: vcustom_b
|
||||||
|
name: VBus Custom Binary Sensor
|
||||||
|
lambda: return x[0] & 1;
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol c
|
||||||
|
temperature_1:
|
||||||
|
name: Temperature 1
|
||||||
|
temperature_2:
|
||||||
|
name: Temperature 2
|
||||||
|
temperature_3:
|
||||||
|
name: Temperature 3
|
||||||
|
operating_hours_1:
|
||||||
|
name: Operating Hours 1
|
||||||
|
heat_quantity:
|
||||||
|
name: Heat Quantity
|
||||||
|
time:
|
||||||
|
name: System Time
|
42
tests/components/vbus/test.esp8266.yaml
Normal file
42
tests/components/vbus/test.esp8266.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
uart:
|
||||||
|
- id: uart_vbus
|
||||||
|
tx_pin: 4
|
||||||
|
rx_pin: 5
|
||||||
|
baud_rate: 9600
|
||||||
|
|
||||||
|
vbus:
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol_bs_plus
|
||||||
|
relay1:
|
||||||
|
name: Relay 1 On
|
||||||
|
relay2:
|
||||||
|
name: Relay 2 On
|
||||||
|
sensor1_error:
|
||||||
|
name: Sensor 1 Error
|
||||||
|
- platform: vbus
|
||||||
|
model: custom
|
||||||
|
command: 0x100
|
||||||
|
source: 0x1234
|
||||||
|
dest: 0x10
|
||||||
|
binary_sensors:
|
||||||
|
- id: vcustom_b
|
||||||
|
name: VBus Custom Binary Sensor
|
||||||
|
lambda: return x[0] & 1;
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol c
|
||||||
|
temperature_1:
|
||||||
|
name: Temperature 1
|
||||||
|
temperature_2:
|
||||||
|
name: Temperature 2
|
||||||
|
temperature_3:
|
||||||
|
name: Temperature 3
|
||||||
|
operating_hours_1:
|
||||||
|
name: Operating Hours 1
|
||||||
|
heat_quantity:
|
||||||
|
name: Heat Quantity
|
||||||
|
time:
|
||||||
|
name: System Time
|
42
tests/components/vbus/test.rp2040.yaml
Normal file
42
tests/components/vbus/test.rp2040.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
uart:
|
||||||
|
- id: uart_vbus
|
||||||
|
tx_pin: 4
|
||||||
|
rx_pin: 5
|
||||||
|
baud_rate: 9600
|
||||||
|
|
||||||
|
vbus:
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol_bs_plus
|
||||||
|
relay1:
|
||||||
|
name: Relay 1 On
|
||||||
|
relay2:
|
||||||
|
name: Relay 2 On
|
||||||
|
sensor1_error:
|
||||||
|
name: Sensor 1 Error
|
||||||
|
- platform: vbus
|
||||||
|
model: custom
|
||||||
|
command: 0x100
|
||||||
|
source: 0x1234
|
||||||
|
dest: 0x10
|
||||||
|
binary_sensors:
|
||||||
|
- id: vcustom_b
|
||||||
|
name: VBus Custom Binary Sensor
|
||||||
|
lambda: return x[0] & 1;
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vbus
|
||||||
|
model: deltasol c
|
||||||
|
temperature_1:
|
||||||
|
name: Temperature 1
|
||||||
|
temperature_2:
|
||||||
|
name: Temperature 2
|
||||||
|
temperature_3:
|
||||||
|
name: Temperature 3
|
||||||
|
operating_hours_1:
|
||||||
|
name: Operating Hours 1
|
||||||
|
heat_quantity:
|
||||||
|
name: Heat Quantity
|
||||||
|
time:
|
||||||
|
name: System Time
|
15
tests/components/veml3235/test.esp32-c3-idf.yaml
Normal file
15
tests/components/veml3235/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_veml3235
|
||||||
|
scl: 5
|
||||||
|
sda: 4
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: veml3235
|
||||||
|
id: veml3235_sensor
|
||||||
|
name: VEML3235 Light Sensor
|
||||||
|
auto_gain: true
|
||||||
|
auto_gain_threshold_high: 90%
|
||||||
|
auto_gain_threshold_low: 15%
|
||||||
|
digital_gain: 1X
|
||||||
|
gain: 1X
|
||||||
|
integration_time: 50ms
|
15
tests/components/veml3235/test.esp32-c3.yaml
Normal file
15
tests/components/veml3235/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_veml3235
|
||||||
|
scl: 5
|
||||||
|
sda: 4
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: veml3235
|
||||||
|
id: veml3235_sensor
|
||||||
|
name: VEML3235 Light Sensor
|
||||||
|
auto_gain: true
|
||||||
|
auto_gain_threshold_high: 90%
|
||||||
|
auto_gain_threshold_low: 15%
|
||||||
|
digital_gain: 1X
|
||||||
|
gain: 1X
|
||||||
|
integration_time: 50ms
|
15
tests/components/veml3235/test.esp32-idf.yaml
Normal file
15
tests/components/veml3235/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_veml3235
|
||||||
|
scl: 16
|
||||||
|
sda: 17
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: veml3235
|
||||||
|
id: veml3235_sensor
|
||||||
|
name: VEML3235 Light Sensor
|
||||||
|
auto_gain: true
|
||||||
|
auto_gain_threshold_high: 90%
|
||||||
|
auto_gain_threshold_low: 15%
|
||||||
|
digital_gain: 1X
|
||||||
|
gain: 1X
|
||||||
|
integration_time: 50ms
|
15
tests/components/veml3235/test.esp32.yaml
Normal file
15
tests/components/veml3235/test.esp32.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_veml3235
|
||||||
|
scl: 16
|
||||||
|
sda: 17
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: veml3235
|
||||||
|
id: veml3235_sensor
|
||||||
|
name: VEML3235 Light Sensor
|
||||||
|
auto_gain: true
|
||||||
|
auto_gain_threshold_high: 90%
|
||||||
|
auto_gain_threshold_low: 15%
|
||||||
|
digital_gain: 1X
|
||||||
|
gain: 1X
|
||||||
|
integration_time: 50ms
|
15
tests/components/veml3235/test.esp8266.yaml
Normal file
15
tests/components/veml3235/test.esp8266.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_veml3235
|
||||||
|
scl: 5
|
||||||
|
sda: 4
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: veml3235
|
||||||
|
id: veml3235_sensor
|
||||||
|
name: VEML3235 Light Sensor
|
||||||
|
auto_gain: true
|
||||||
|
auto_gain_threshold_high: 90%
|
||||||
|
auto_gain_threshold_low: 15%
|
||||||
|
digital_gain: 1X
|
||||||
|
gain: 1X
|
||||||
|
integration_time: 50ms
|
15
tests/components/veml3235/test.rp2040.yaml
Normal file
15
tests/components/veml3235/test.rp2040.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_veml3235
|
||||||
|
scl: 5
|
||||||
|
sda: 4
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: veml3235
|
||||||
|
id: veml3235_sensor
|
||||||
|
name: VEML3235 Light Sensor
|
||||||
|
auto_gain: true
|
||||||
|
auto_gain_threshold_high: 90%
|
||||||
|
auto_gain_threshold_low: 15%
|
||||||
|
digital_gain: 1X
|
||||||
|
gain: 1X
|
||||||
|
integration_time: 50ms
|
3
tests/components/version/test.esp32-c3-idf.yaml
Normal file
3
tests/components/version/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
text_sensor:
|
||||||
|
- platform: version
|
||||||
|
name: "ESPHome Version"
|
3
tests/components/version/test.esp32-c3.yaml
Normal file
3
tests/components/version/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
text_sensor:
|
||||||
|
- platform: version
|
||||||
|
name: "ESPHome Version"
|
3
tests/components/version/test.esp32-idf.yaml
Normal file
3
tests/components/version/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
text_sensor:
|
||||||
|
- platform: version
|
||||||
|
name: "ESPHome Version"
|
3
tests/components/version/test.esp32.yaml
Normal file
3
tests/components/version/test.esp32.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
text_sensor:
|
||||||
|
- platform: version
|
||||||
|
name: "ESPHome Version"
|
3
tests/components/version/test.esp8266.yaml
Normal file
3
tests/components/version/test.esp8266.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
text_sensor:
|
||||||
|
- platform: version
|
||||||
|
name: "ESPHome Version"
|
3
tests/components/version/test.rp2040.yaml
Normal file
3
tests/components/version/test.rp2040.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
text_sensor:
|
||||||
|
- platform: version
|
||||||
|
name: "ESPHome Version"
|
12
tests/components/vl53l0x/test.esp32-c3-idf.yaml
Normal file
12
tests/components/vl53l0x/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_vl53l0x
|
||||||
|
scl: 5
|
||||||
|
sda: 4
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vl53l0x
|
||||||
|
name: VL53L0x Distance
|
||||||
|
address: 0x29
|
||||||
|
enable_pin: 3
|
||||||
|
timeout: 200us
|
||||||
|
update_interval: 60s
|
12
tests/components/vl53l0x/test.esp32-c3.yaml
Normal file
12
tests/components/vl53l0x/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_vl53l0x
|
||||||
|
scl: 5
|
||||||
|
sda: 4
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vl53l0x
|
||||||
|
name: VL53L0x Distance
|
||||||
|
address: 0x29
|
||||||
|
enable_pin: 3
|
||||||
|
timeout: 200us
|
||||||
|
update_interval: 60s
|
12
tests/components/vl53l0x/test.esp32-idf.yaml
Normal file
12
tests/components/vl53l0x/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_vl53l0x
|
||||||
|
scl: 16
|
||||||
|
sda: 17
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vl53l0x
|
||||||
|
name: VL53L0x Distance
|
||||||
|
address: 0x29
|
||||||
|
enable_pin: 3
|
||||||
|
timeout: 200us
|
||||||
|
update_interval: 60s
|
12
tests/components/vl53l0x/test.esp32.yaml
Normal file
12
tests/components/vl53l0x/test.esp32.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_vl53l0x
|
||||||
|
scl: 16
|
||||||
|
sda: 17
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vl53l0x
|
||||||
|
name: VL53L0x Distance
|
||||||
|
address: 0x29
|
||||||
|
enable_pin: 3
|
||||||
|
timeout: 200us
|
||||||
|
update_interval: 60s
|
12
tests/components/vl53l0x/test.esp8266.yaml
Normal file
12
tests/components/vl53l0x/test.esp8266.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_vl53l0x
|
||||||
|
scl: 5
|
||||||
|
sda: 4
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vl53l0x
|
||||||
|
name: VL53L0x Distance
|
||||||
|
address: 0x29
|
||||||
|
enable_pin: 3
|
||||||
|
timeout: 200us
|
||||||
|
update_interval: 60s
|
12
tests/components/vl53l0x/test.rp2040.yaml
Normal file
12
tests/components/vl53l0x/test.rp2040.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
i2c:
|
||||||
|
- id: i2c_vl53l0x
|
||||||
|
scl: 5
|
||||||
|
sda: 4
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: vl53l0x
|
||||||
|
name: VL53L0x Distance
|
||||||
|
address: 0x29
|
||||||
|
enable_pin: 3
|
||||||
|
timeout: 200us
|
||||||
|
update_interval: 60s
|
57
tests/components/voice_assistant/test.esp32-c3-idf.yaml
Normal file
57
tests/components/voice_assistant/test.esp32-c3-idf.yaml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
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: 6
|
||||||
|
i2s_bclk_pin: 7
|
||||||
|
i2s_mclk_pin: 5
|
||||||
|
|
||||||
|
microphone:
|
||||||
|
- platform: i2s_audio
|
||||||
|
id: mic_id_external
|
||||||
|
i2s_din_pin: 3
|
||||||
|
adc_type: external
|
||||||
|
pdm: false
|
||||||
|
|
||||||
|
speaker:
|
||||||
|
- platform: i2s_audio
|
||||||
|
id: speaker_id
|
||||||
|
dac_type: external
|
||||||
|
i2s_dout_pin: 2
|
||||||
|
mode: mono
|
||||||
|
|
||||||
|
voice_assistant:
|
||||||
|
microphone: mic_id_external
|
||||||
|
speaker: speaker_id
|
||||||
|
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()]
|
57
tests/components/voice_assistant/test.esp32-c3.yaml
Normal file
57
tests/components/voice_assistant/test.esp32-c3.yaml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
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: 6
|
||||||
|
i2s_bclk_pin: 7
|
||||||
|
i2s_mclk_pin: 5
|
||||||
|
|
||||||
|
microphone:
|
||||||
|
- platform: i2s_audio
|
||||||
|
id: mic_id_external
|
||||||
|
i2s_din_pin: 3
|
||||||
|
adc_type: external
|
||||||
|
pdm: false
|
||||||
|
|
||||||
|
speaker:
|
||||||
|
- platform: i2s_audio
|
||||||
|
id: speaker_id
|
||||||
|
dac_type: external
|
||||||
|
i2s_dout_pin: 2
|
||||||
|
mode: mono
|
||||||
|
|
||||||
|
voice_assistant:
|
||||||
|
microphone: mic_id_external
|
||||||
|
speaker: speaker_id
|
||||||
|
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()]
|
57
tests/components/voice_assistant/test.esp32-idf.yaml
Normal file
57
tests/components/voice_assistant/test.esp32-idf.yaml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
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: 16
|
||||||
|
i2s_bclk_pin: 17
|
||||||
|
i2s_mclk_pin: 15
|
||||||
|
|
||||||
|
microphone:
|
||||||
|
- platform: i2s_audio
|
||||||
|
id: mic_id_external
|
||||||
|
i2s_din_pin: 13
|
||||||
|
adc_type: external
|
||||||
|
pdm: false
|
||||||
|
|
||||||
|
speaker:
|
||||||
|
- platform: i2s_audio
|
||||||
|
id: speaker_id
|
||||||
|
dac_type: external
|
||||||
|
i2s_dout_pin: 12
|
||||||
|
mode: mono
|
||||||
|
|
||||||
|
voice_assistant:
|
||||||
|
microphone: mic_id_external
|
||||||
|
speaker: speaker_id
|
||||||
|
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()]
|
57
tests/components/voice_assistant/test.esp32.yaml
Normal file
57
tests/components/voice_assistant/test.esp32.yaml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
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: 16
|
||||||
|
i2s_bclk_pin: 17
|
||||||
|
i2s_mclk_pin: 15
|
||||||
|
|
||||||
|
microphone:
|
||||||
|
- platform: i2s_audio
|
||||||
|
id: mic_id_external
|
||||||
|
i2s_din_pin: 13
|
||||||
|
adc_type: external
|
||||||
|
pdm: false
|
||||||
|
|
||||||
|
speaker:
|
||||||
|
- platform: i2s_audio
|
||||||
|
id: speaker_id
|
||||||
|
dac_type: external
|
||||||
|
i2s_dout_pin: 12
|
||||||
|
mode: mono
|
||||||
|
|
||||||
|
voice_assistant:
|
||||||
|
microphone: mic_id_external
|
||||||
|
speaker: speaker_id
|
||||||
|
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()]
|
Loading…
Reference in a new issue