Skip to content

Instantly share code, notes, and snippets.

@akoivist
akoivist / settime.py
Created September 1, 2024 13:15
Python app to set the time of a ATC/PVVX BLE thermometers
import asyncio
import time
import datetime
import pytz # Ensure you have pytz installed
from bleak import BleakScanner, BleakClient # Ensure you have bleak installed
from bleak.exc import BleakError
# Define the MAC address and characteristic UUID
DEVICE_ADDRESS = "xx:xx:xx:xx:xx:xx"
CHARACTERISTIC_UUID = "00001f1f-0000-1000-8000-00805f9b34fb"