mirror of
https://github.com/hassio-addons/addon-airsonos.git
synced 2025-05-04 19:11:22 +00:00
Migrate AirSonos config out of Home Assistant config folder (#149)
This commit is contained in:
parent
bf604f18d8
commit
015f13af0e
3 changed files with 12 additions and 3 deletions
|
@ -168,8 +168,8 @@ lack of audio. Note that `latency_rtp` does not delay playback start.
|
||||||
|
|
||||||
## Tweaking AirSonos
|
## Tweaking AirSonos
|
||||||
|
|
||||||
AirSonos creates a configuration file called `airsonos.xml` in your Home
|
AirSonos creates a configuration file called `airsonos.xml` in the add-on
|
||||||
Assistant configuration directory. This file allows you to tweak each device
|
configuration directory. This file allows you to tweak each device
|
||||||
separately. Every time it finds a new device, it will be added to that file.
|
separately. Every time it finds a new device, it will be added to that file.
|
||||||
|
|
||||||
> **NOTE**: It is HIGHLY recommended to stop the addon before making changes
|
> **NOTE**: It is HIGHLY recommended to stop the addon before making changes
|
||||||
|
|
|
@ -14,7 +14,8 @@ arch:
|
||||||
hassio_api: true
|
hassio_api: true
|
||||||
host_network: true
|
host_network: true
|
||||||
map:
|
map:
|
||||||
- config:rw
|
- addon_config:rw
|
||||||
|
- homeassistant_config:rw
|
||||||
options:
|
options:
|
||||||
port: 49152
|
port: 49152
|
||||||
latency_rtp: 1000
|
latency_rtp: 1000
|
||||||
|
|
|
@ -6,6 +6,14 @@
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
declare latency
|
declare latency
|
||||||
|
|
||||||
|
# Migrate add-on data from the Home Assistant config folder,
|
||||||
|
# to the add-on configuration folder.
|
||||||
|
if ! bashio::fs.directory_exists '/config/airsonos.xml' \
|
||||||
|
&& bashio::fs.file_exists '/homeassistant/airsonos.xml'; then
|
||||||
|
mv /homeassistant/airsonos.xml /config/airsonos.xml \
|
||||||
|
|| bashio::exit.nok "Failed to migrate AirSonos configuration"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a configuration file, if it does not exist yet
|
# Create a configuration file, if it does not exist yet
|
||||||
if ! bashio::fs.file_exists '/config/airsonos.xml'; then
|
if ! bashio::fs.file_exists '/config/airsonos.xml'; then
|
||||||
cp /etc/airsonos.xml /config/airsonos.xml
|
cp /etc/airsonos.xml /config/airsonos.xml
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue