Skip to content

Commit 028f50a

Browse files
authored
Merge pull request #150 from tekktrik/feature/advertisement-equality
Implement Advertisement.__eq__()
2 parents f671192 + 5ad75f7 commit 028f50a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

adafruit_ble/advertising/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,11 @@ def __bytes__(self):
301301
"""The raw packet bytes."""
302302
return encode_data(self.data_dict)
303303

304+
def __eq__(self, other):
305+
if isinstance(other, Advertisement):
306+
return self.data_dict == other.data_dict
307+
return False
308+
304309
def __str__(self):
305310
parts = []
306311
for attr in dir(self.__class__):

0 commit comments

Comments
 (0)