-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathviolet-nabaztag-tag.yaml
97 lines (83 loc) · 1.73 KB
/
violet-nabaztag-tag.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
substitutions:
name: "violet-nabaztag-tag"
friendly_name: "Violet Nabaztag Tag"
wifi_ap_password: ""
esphome:
name: ${name}
friendly_name: ${friendly_name}
project:
name: violet.nabaztag-tag
version: "1.0"
esp32:
board: az-delivery-devkit-v4
framework:
type: arduino
logger:
api:
ota:
dashboard_import:
package_import_url: github://bemble/esphome-nabaztag/violet-nabaztag-tag.yaml@main
wifi:
ap:
password: "${wifi_ap_password}"
captive_portal:
improv_serial:
i2s_audio:
- id: i2s_out
i2s_lrclk_pin: GPIO18
i2s_bclk_pin: GPIO19
- id: i2s_in
i2s_lrclk_pin: GPIO27 #ws
i2s_bclk_pin: GPIO14 #clk
speaker:
- platform: i2s_audio
id: max98357_speaker
dac_type: external
i2s_audio_id: i2s_out
i2s_dout_pin: GPIO21
mode: mono
media_player:
- platform: i2s_audio
name: None
dac_type: external
i2s_audio_id: i2s_out
i2s_dout_pin: GPIO21
mode: mono
microphone:
- platform: i2s_audio
i2s_audio_id: i2s_in
i2s_din_pin: GPIO26 #sd
id: inmp441_mic
adc_type: external
pdm: false
binary_sensor:
- platform: gpio
pin:
number: GPIO23
mode: INPUT_PULLUP
inverted: True
name: "Head button"
on_press:
- voice_assistant.start:
on_release:
- voice_assistant.stop:
switch:
- platform: gpio
name: "Left ear"
id: "left_ear"
pin: GPIO22
voice_assistant:
microphone: inmp441_mic
speaker: max98357_speaker
on_tts_end:
- switch.turn_on: left_ear
- delay: 3000ms
- switch.turn_off: left_ear
on_error:
- switch.turn_on: left_ear
- delay: 1500ms
- switch.turn_off: left_ear
- delay: 500ms
- switch.turn_on: left_ear
- delay: 1500ms
- switch.turn_off: left_ear