mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 14:16:47 +00:00
24 lines
520 B
YAML
24 lines
520 B
YAML
microphone:
|
|
- platform: i2s_audio
|
|
id: i2s_microphone
|
|
i2s_audio_id: i2s_audio_bus
|
|
i2s_din_pin: ${i2s_din_pin}
|
|
adc_type: external
|
|
bits_per_sample: 16bit
|
|
|
|
sensor:
|
|
- platform: sound_level
|
|
microphone: i2s_microphone
|
|
measurement_duration: 2000ms
|
|
passive: false
|
|
peak:
|
|
name: "Peak Sound Level"
|
|
on_value_range:
|
|
- above: -1.0
|
|
then:
|
|
- sound_level.stop:
|
|
- delay: 5s
|
|
- sound_level.start:
|
|
rms:
|
|
name: "RMS Sound Level"
|