Skip to content

Commit 3b4c63c

Browse files
bthome.py - sort object_ids when packing data (issue #9)
1 parent 322a93e commit 3b4c63c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bthome.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def _pack_service_data(self, *args):
461461
) # indicates a 16-bit service UUID follows
462462
service_data_bytes += pack("<H", BTHome._SERVICE_UUID16)
463463
service_data_bytes += pack("B", BTHome._DEVICE_INFO_FLAGS)
464-
for object_id in args:
464+
for object_id in sorted(args):
465465
func = BTHome._object_id_functions[object_id]
466466
property = BTHome._object_id_properties[object_id]
467467
value = getattr(self, property)

0 commit comments

Comments
 (0)