test
This commit is contained in:
@@ -13,12 +13,15 @@ if bashio::config.has_value 'usbdevices'; then
|
||||
readarray -t usbdevices < <(echo "$usbdevices_json")
|
||||
bashio::log.info "Devices: ${usbdevices}"
|
||||
for usbdevice in "${usbdevices[@]}"; do
|
||||
use=$(echo $usbdevice | jq '.use | tostring')
|
||||
use=$(echo $usbdevice | jq '.use | if .test then true else false end')
|
||||
device=$(echo $usbdevice | jq '.device | tostring')
|
||||
deviceid=$(echo $device | sed 's/.*(\(.*\))/\1/g')
|
||||
|
||||
bashio::log.info "Use: ${use}"
|
||||
bashio::log.info "Set AUTO USE DEVICE for ${deviceid}"
|
||||
if [ $use ]; then
|
||||
bashio::log.info "Set AUTO USE DEVICE for ${deviceid}"
|
||||
else
|
||||
bashio::log.info "Set STOP USING for ${deviceid}"
|
||||
fi
|
||||
|
||||
# sed 's/.*(\(.*\))/\1/g'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user