I
I bought following Bluetooth speaker with AUX input
If the AUX is plugged in this speaker will NOT turn off. Which is good.
(Of course you can use any other speaker with AUX input, just make sure it does not turn off if there is no audio signal for some time)
Next I got an M5 Atom Lite for 9 Euros. Integrate the ATOM into HA ESPHome with the YAML at end of this post.
For the Audio connection get a Grove-connector-pigtail and a 3.5mm Audio plug. Connect the GND pin from Grove to the sleeve of the 3.5mm plug, and connect pinG26 to ring and
tip of the 3.5mm plug. That’s it ! Audio output is ok for TTS (text to speech) , a bit noisy (ESP DAC output) but ok for the money.
The ATOM also has a multi-color LED and a button which may be used within HA.
YAML:
esphome:
name: atom1
esp32:
board: m5stack-atom
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "YepG0NPvvvvvvvvvvvvvvvo+1UMftYc="
ota:
password: "8c57b3vvvvvvvvvvvvvvvvvv9f4"
wifi:
# ssid: !secret wifi_ssid
# password: !secret wifi_password
ssid: "JvvvvvvvvvvT"
password: "vvvvvvvvvvvvvc"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "M5Stick Fallback Hotspot"
password: "Svvvvvvvvvvvvvv9zF"
captive_portal:
# Example configuration entry
media_player:
- platform: i2s_audio
name: ESPHome I2S Media Player
dac_type: internal
#i2s_lrclk_pin: GPIO33
#i2s_dout_pin: GPIO26
#i2s_bclk_pin: GPIO19
#mode: mono
mode: left
## Device-specific
light:
- platform: fastled_clockless
chipset: WS2812B
pin: 27
num_leds: 1
rgb_order: GRB
id: status_led
name: ${friendly_name} Light
effects:
- random:
- flicker:
- addressable_rainbow:
binary_sensor:
- platform: gpio
pin:
number: 39
inverted: true
name: ${friendly_name} Button
on_press:
then:
- light.toggle: status_led