Closed baylanger closed 2 months ago
Did you test it? I guess yes. Maybe update already the changelog as this will change the entity name.
Yes but I wasn't happy with the result. The output was mixed with Bluetooth advertisement received from devices. To change that, the output now goes in a variable and also spit it out using log_notice.
It looks really nice now, give it a try I think you'll like it as well.
Once approved we can merge it in stage.
I just added this to put a warning if the Bluez version isn't recommended.
bltctlVersion=$(echo "$BLTCTL_OUT" | grep ^Version | sed -e 's/^Version //g')
bltctlMinVersion=5.63
if awk -v n1="$bltctlMinVersion" -v n2="$bltctlVersion" 'BEGIN {exit !(n1 > n2)}'; then
log_warning "Minimum recommended version of Bluez:$bltctlMinVersion; your system version:$bltctlVersion"
else
log_debug "Minimum recommended version of Bluez:$bltctlMinVersion; your system version:$bltctlVersion"
fi
Thank you @iainbullock for approving.
It runs the following commands:
BlueZ >= 5.63 as older versions have been reported to be unreliable
ref: https://www.home-assistant.io/integrations/bluetooth/This replaces the previous scan-ble-macaddr