mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 08:20:21 +00:00
[microphone] Use the apply helpers for the capture, mute and condition automations (#19619)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# capture, stop_capture and is_capturing on the external microphone.
|
||||
button:
|
||||
- platform: template
|
||||
name: Microphone Capture
|
||||
on_press:
|
||||
- if:
|
||||
condition:
|
||||
microphone.is_capturing: mic_id_external
|
||||
then:
|
||||
- microphone.stop_capture: mic_id_external
|
||||
else:
|
||||
- microphone.capture: mic_id_external
|
||||
@@ -0,0 +1,8 @@
|
||||
substitutions:
|
||||
i2s_din_pin1: GPIO33
|
||||
i2s_din_pin2: GPIO34
|
||||
|
||||
packages:
|
||||
i2s_audio: !include ../../test_build_components/common/i2s_audio/esp32-idf.yaml
|
||||
microphone: !include common-pdm.yaml
|
||||
actions: !include common-actions.yaml
|
||||
Reference in New Issue
Block a user