Skip to content

Commit 396d848

Browse files
main.py remove misleading debug output
1 parent 25cc2bd commit 396d848

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

main.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,14 @@
2020
print(hexlify(bluetooth_mac, ':').decode().upper())
2121

2222
async def read_sensor():
23-
bthome.temperature = 25
23+
bthome.temperature = 25 # Mocked up data for testing purposes.
2424
bthome.humidity = 50.55
25-
print(f"BTHome flags: {bthome._ADVERT_FLAGS.hex().upper()}")
26-
print(f"Device name: {bthome._pack_device_name().hex().upper()}")
27-
print(f"Temperature data: {bthome._pack_temperature(bthome.TEMPERATURE_SINT16).hex().upper()}")
28-
print(f"Humidity data: {bthome._pack_humidity(bthome.HUMIDITY_UINT16).hex().upper()}")
29-
print(f"BTHome advertisement: {bthome.pack_advertisement(bthome.TEMPERATURE_SINT16, bthome.HUMIDITY_UINT16).hex().upper()}")
3025
await asyncio.sleep(AWAKE_TIME_SECS)
3126
print("Going to sleep.")
3227
deepsleep(SLEEP_TIME_SECS * 1000) # Helps mitigate sensor self-heating.
3328

3429
async def communicate_readings():
35-
print("Advertising availability of data.")
30+
print("Constructing advertising payload")
3631
while True:
3732
async with await aioble.advertise(
3833
BLE_ADV_INTERVAL_uS,

0 commit comments

Comments
 (0)