![如何在Linux上查看苹果airpods和外壳的电池百分比?](https://linux22.com/image/177203/%E5%A6%82%E4%BD%95%E5%9C%A8Linux%E4%B8%8A%E6%9F%A5%E7%9C%8B%E8%8B%B9%E6%9E%9Cairpods%E5%92%8C%E5%A4%96%E5%A3%B3%E7%9A%84%E7%94%B5%E6%B1%A0%E7%99%BE%E5%88%86%E6%AF%94%EF%BC%9F.png)
Linux 上有没有检查 AirPods 电池状态的命令?
我是开发者i3blocks-airpods
只是想知道是否有办法检查电池状态?
答案1
您可以使用 github 上的代码https://github.com/delphiki/AirStatus。
git clone [email protected]:delphiki/AirStatus.git
cd AirStatus
pip3 install bleak
python3 main.py
使用此功能时您将看到以下内容:
{"status": 1, "charge": {"left": 90, "right": 90, "case": -1}, "charging": "N/A", "model": "AirPods", "date": "2021-09-21 12:30:30", "raw": "0719010f202b998f000005521019d293ae902e66fbc70XXXXXXXX"}