Skip to content

Packet ID doesn't work #14

@llamafilm

Description

@llamafilm

How is packet_id meant to be used? It seems broken but maybe I'm missing something.

>>> from bthome import BTHome
>>> beacon = BTHome()
>>> beacon.packet_id
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bthome.py", line 310, in packet_id
AttributeError: 'BTHome' object has no attribute '_packet_id'

I think we just need to add self._packet_id = 0 to the class constructor. After doing that, it increments on each advertisement.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions