This commit is contained in:
Hans Karlinius
2024-11-30 08:50:50 +01:00
parent 405933e9e0
commit 0fd9dc8a71
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
#!/command/with-contenv bashio
set -x
#set -x
#test=($(bashio::config 'test'))
#test+=('one', 'two')
@@ -26,7 +26,8 @@ for device in "${devices[@]}"; do
gurka=$(echo $options | jq --arg device "$device" '.usbdevices[] | select(.device == ($device))')
bashio::log.info "Options: ${gurka}"
if [[ ! " ${options}.usbdevices[*] " =~ [[:space:]]${device}[[:space:]] ]]; then
#if [[ ! " ${options}.usbdevices[*] " =~ [[:space:]]${device}[[:space:]] ]]; then
if [ -z $(echo $options | jq --arg device "$device" '.usbdevices[] | select(.device == ($device))') ]; then
bashio::log.info "Adding to config: ${device}"