Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add id to the speaker component #294

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Add id to the speaker component #294

merged 1 commit into from
Jan 17, 2025

Conversation

johnboiles
Copy link
Contributor

@johnboiles johnboiles commented Jan 16, 2025

This allows users to override this and use their own speaker. I'm using it to add digital optical SPDIF (via esphome/esphome#8065) to my Home Assistant Voice Preview Edition via the Grove port without needing to entirely fork home-assistant-voice.yaml. It's working flawlessly so far:

HA Voice PE with MSB Technology DAC HA Voice PE top view Optical transmitter connected via Grove port Optical transmitter to Grove wiring
packages:
  remote_package_shorthand: github://johnboiles/home-assistant-voice-pe/home-assistant-voice.yaml@dev

esphome:
  name: home-assistant-voice
  friendly_name: Home Assistant Voice
  name_add_mac_suffix: false

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true # Required for hidden AP

external_components:
  - source: github://pr#8065
    components: [ i2s_audio, spdif_audio ]
    refresh: 0s

i2s_audio:
  - id: !remove i2s_output
  - id: i2s_output_spdif

speaker:
  - id: !remove i2s_audio_speaker
  - id: spdif_speaker
    platform: spdif_audio
    i2s_audio_id: i2s_output_spdif
    data_pin: GPIO1 # Grove port SDA pin
    sample_rate: 48000
    timeout: never
    buffer_duration: 80ms
    fill_silence: true
    debug: true

switch:
  - platform: gpio
    pin: GPIO46
    id: grove_port_power
    restore_mode: ALWAYS_ON
    setup_priority: 1001

media_player:
  - id: !extend nabu_media_player
    name: Media Player
    audio_dac: !remove
    volume_increment: !remove
    volume_min: !remove
    volume_max: !remove

Copy link
Contributor

@kahrendt kahrendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kahrendt kahrendt merged commit 5288dde into esphome:dev Jan 17, 2025
10 of 11 checks passed
@Rudd-O
Copy link

Rudd-O commented Jan 23, 2025

https://www.printables.com/model/1142869-near-vertical-stand-for-nabu-casas-voice-assistant

I made you a Grove hole for the stand.

@johnboiles
Copy link
Contributor Author

@Rudd-O awesome!! I'll try it out

@johnboiles
Copy link
Contributor Author

@Rudd-O looks great! Thank you!
IMG_0058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants