-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathc3sumermini.yaml
124 lines (102 loc) · 2.41 KB
/
c3sumermini.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
117
118
119
120
121
122
123
124
esphome:
name: esp-c3-mic
friendly_name: C3 Voice
platformio_options:
board_build.flash_mode: dio
esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
logger:
api:
on_client_connected:
then:
- delay: 1s
- voice_assistant.start_continuous:
- delay: 1s
- lambda: id(va).set_use_wake_word(true);
- delay: 1s
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
button:
- platform: template
name: restart voice
on_press:
then:
- switch.turn_on: va_sw
- delay: 200ms
- switch.turn_off: va_sw
- platform: restart
id: reboot
name: "Reboot"
switch:
- platform: template
id: va_sw
name: Pause Pipeline
on_turn_on:
then:
- delay: 200ms
- voice_assistant.stop
on_turn_off:
then:
- delay: 400ms
- voice_assistant.start_continuous
optimistic: true
sensor:
- platform: internal_temperature
name: "C3 Temperature"
entity_category: "diagnostic"
- platform: wifi_signal
name: "WiFi Signal dB"
id: wifi_signal_db
update_interval: 60s
entity_category: "diagnostic"
- platform: copy
source_id: wifi_signal_db
name: "WiFi Signal Percent"
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: "Signal %"
entity_category: "diagnostic"
text_sensor:
- platform: wifi_info
ip_address:
name: IP Address
ssid:
name: SSID
bssid:
name: BSSID
mac_address:
name: Mac Address
dns_address:
name: DNS
i2s_audio:
i2s_lrclk_pin: GPIO2
i2s_bclk_pin: GPIO3
microphone:
- platform: i2s_audio
id: va_mic
adc_type: external
i2s_din_pin: GPIO4
channel: left
pdm: false
voice_assistant:
id: va
microphone: va_mic
noise_suppression_level: 1
volume_multiplier: 4.0
on_client_disconnected:
then:
- voice_assistant.stop:
- lambda: id(va).set_use_wake_word(false);
on_tts_end:
then:
- homeassistant.service:
service: media_player.play_media
data:
entity_id: media_player.NAME_OF_MEDIA_PLAYER #change to the name of your media player entity to output audio to
media_content_id: !lambda 'return x;'
media_content_type: music
announce: "true"