Skip to content

Commit 0a03645

Browse files
committed
Update 1.2.3
- Fixed an error when using the built-in Bluetooth adapter. - Slightly improved Bluetooth transfer speed.
1 parent bb586aa commit 0a03645

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

custom_components/gicisky/gicisky_ble/writer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ async def update_image(
5555
]
5656
if len(char_uuids) < 2:
5757
raise BleakServiceMissing(f"UUID Len: {len(char_uuids)}")
58-
gicisky = GiciskyClient(client, char_uuids, device)
58+
sorted_uuids = sorted(char_uuids, key=lambda x: int(x[4:8], 16))
59+
gicisky = GiciskyClient(client, sorted_uuids, device)
5960
await gicisky.start_notify()
6061
success = await gicisky.write_image(image, threshold, red_threshold)
6162
await gicisky.stop_notify()
@@ -111,7 +112,7 @@ async def write(self, uuid: str, data: bytes) -> None:
111112
chunk = len(data)
112113
for i in range(0, len(data), chunk):
113114
await self.client.write_gatt_char(uuid, data[i : i + chunk])
114-
await sleep(0.05)
115+
#await sleep(0.05)
115116

116117
def _notification_handler(self, _: Any, data: bytearray) -> None:
117118
if self.command_data == None:

custom_components/gicisky/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"documentation": "https://github.com/eigger/hass-gicisky",
1414
"issue_tracker": "https://github.com/eigger/hass-gicisky/issues",
1515
"iot_class": "local_push",
16-
"version": "1.2.2",
16+
"version": "1.2.3",
1717
"requirements": [
1818
"qrcode[pil]",
1919
"python-barcode"

0 commit comments

Comments
 (0)