Skip to content

Commit 575cab5

Browse files
Update bthome.py to initialize _packet_id
Issue #14
1 parent ba74b75 commit 575cab5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/bthome.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ def __init__(self, local_name="BTHome", debug=False):
299299
local_name = local_name[:10] # Truncate to fit [^4]
300300
self._local_name = local_name
301301
self.debug = debug
302+
self._packet_id = -1 # -1 so it will self-increment to 0 on first use.
303+
302304

303305
@property
304306
def local_name(self):

0 commit comments

Comments
 (0)