mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-24 17:51:49 +02:00
Ensure audio_card is set for homeassistant_microphone
This commit is contained in:
@@ -11,9 +11,10 @@ echo " "
|
|||||||
# Check if alsa_card is provided
|
# Check if alsa_card is provided
|
||||||
CONFIG_LOCATION="/config/config.yaml"
|
CONFIG_LOCATION="/config/config.yaml"
|
||||||
if bashio::config.true "homeassistant_microphone"; then
|
if bashio::config.true "homeassistant_microphone"; then
|
||||||
audio_card="default"
|
|
||||||
bashio::log.info "homeassistant_microphone option is selected. The audio card config value is set to 'default'. Set in the addon options to which this is set"
|
bashio::log.info "homeassistant_microphone option is selected. The audio card config value is set to 'default'. Set in the addon options to which this is set"
|
||||||
|
audio_card="default"
|
||||||
else
|
else
|
||||||
|
bashio::log.warning "homeassistant_microphone option is not set, disabling microphone input"
|
||||||
audio_card=""
|
audio_card=""
|
||||||
fi
|
fi
|
||||||
yq -iy ".realtime.audio.source = \"${audio_card}\"" "$CONFIG_LOCATION"
|
yq -iy ".realtime.audio.source = \"${audio_card}\"" "$CONFIG_LOCATION"
|
||||||
|
|||||||
Reference in New Issue
Block a user