Created
January 18, 2020 16:30
-
-
Save dnicolson/8d679870ba8a75309a3a5e34b6eb8a4e to your computer and use it in GitHub Desktop.
Control a HomeKit lightbulb from the Touch Bar with this Quick Action (requires getting the pairing keys from the Keychain)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PYTHON=/Users/dave/.asdf/shims/python3 | |
STATUS=`$PYTHON -m homekit.get_characteristic -f ~/.homekit_python/pairing.json -a iHaper -c 1.13` | |
if [[ "$STATUS" =~ "true" ]]; then | |
$PYTHON -m homekit.put_characteristic -f ~/.homekit_python/pairing.json -a iHaper -c 1.13 false | |
else | |
$PYTHON -m homekit.put_characteristic -f ~/.homekit_python/pairing.json -a iHaper -c 1.13 true | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment