-
Notifications
You must be signed in to change notification settings - Fork 114
/
m5stack-atom-echo.yaml
116 lines (102 loc) · 2.05 KB
/
m5stack-atom-echo.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
substitutions:
name: "m5stack-atom-echo"
friendly_name: "M5Stack Atom Echo"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
name_add_mac_suffix: true
project:
name: m5stack.atom-echo-voice-assistant
version: "1.0"
esp32:
board: m5stack-atom
framework:
type: arduino
logger:
api:
ota:
dashboard_import:
package_import_url: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main
wifi:
ap:
password: "${wifi_ap_password}"
captive_portal:
improv_serial:
i2s_audio:
i2s_lrclk_pin: GPIO33
i2s_bclk_pin: GPIO19
microphone:
- platform: i2s_audio
id: echo_microphone
i2s_din_pin: GPIO23
media_player:
- platform: i2s_audio
name: None
id: echo_audio
dac_type: external
i2s_dout_pin: GPIO22
mode: mono
voice_assistant:
microphone: echo_microphone
on_start:
- light.turn_on:
id: led
blue: 100%
red: 0%
green: 0%
on_tts_start:
- light.turn_on:
id: led
blue: 0%
red: 0%
green: 100%
on_tts_end:
- light.turn_on:
id: led
blue: 0%
red: 0%
green: 100%
- media_player.play_media: !lambda return x;
on_end:
- delay: 1s
- if:
condition:
media_player.is_playing:
then:
- wait_until:
media_player.is_idle:
- light.turn_off: led
else:
- light.turn_off: led
on_error:
- light.turn_on:
id: led
blue: 0%
red: 100%
green: 0%
- delay: 1s
- light.turn_off: led
binary_sensor:
- platform: gpio
pin:
number: GPIO39
inverted: true
name: Button
disabled_by_default: true
entity_category: diagnostic
id: echo_button
on_press:
- voice_assistant.start:
on_release:
- voice_assistant.stop:
light:
- platform: fastled_clockless
id: led
name: None
disabled_by_default: true
entity_category: config
pin: GPIO27
default_transition_length: 0s
chipset: SK6812
num_leds: 1
rgb_order: grb