Skip to content

Instantly share code, notes, and snippets.

View dbuezas's full-sized avatar
👾

David Buezas dbuezas

👾
View GitHub Profile
@dbuezas
dbuezas / restart_bluetooth.sh
Created December 8, 2023 17:52
Restart bluetooth dongles
# Get a list of all controllers
controllers=$(bluetoothctl list | awk '{print $2}')
# Loop through each controller and restart it
for controller in $controllers; do
echo "Turning off: $controller"
# Turn off the controller
echo -e "select $controller\npower off" | bluetoothctl
done
blueprint:
name: ZHA - Smart Knob for lights
source_url: https://gist.github.com/dbuezas/832d15a762488f2754c59bc9ca9632da
description: "Control lights with a Moes Smart Knob.
Rotating left/right will change the brightness smoothly of the selected light
and making use of step_size.
Press-Rotating left/right will change the color temperature (or hue).
Long press switches between color temperature and rgb modes.