This commit is contained in:
Hans Karlinius
2024-11-30 20:13:04 +01:00
parent 81c97da033
commit 3bbe2412d9
2 changed files with 7 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
name: VirtualHere Client
version: "0.1.304"
version: "0.1.305"
slug: vhclient
description: VirtualHere Client
arch:

View File

@@ -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'