Is the Home Assistant BTHome implementation done well ? Absolutely not !

Stuff needed

Same tools as in BTHome Analysis post:

Test sequence

Below is the ordered test sequence.

Counter value (little endian)DescriptionAdvertised payloadResult
0x0000000AFunctional test. Must work.D2FC41D890C2B10A000000A522591APass: detected and encryption key added
N/AUnencrypted payload. Must not work.D2FC4400AB01643A01 and D2FC4400EC01643A01Pass: button presses not showing up in activity
0x0000000BFunctional test. Must workD2FC419FACE9970B0000000693EFA3Pass: button press showing up in activity
0x00000005Counter value decreased. Must not work.D2FC41F92213B9050000002C3B30EFFail: button press showing up in activity. It shouldn’t as counter decreased.
0x0000000CValid counter value. Must work again.D2FC41F08CB92E0C000000A31A1C90Pass: button press showing up in activity
0x0000000CReplay attack. Must not work.D2FC41F08CB92E0C000000A31A1C90Pass: button presses not showing up in activity. It may be to avoid detecting several times the same advertisement.
0xF0000000Big counter jump forward. Must work.D2FC41557712F8000000F04A101E93Pass: button press showing up in activity
0xFFFFFFFFBiggest counter value possible. Must work.D2FC41CEB140D8FFFFFFFF6343DC0CPass: button presses not showing up in activity
0x00000000Counter overflow. Does it still work ?D2FC4104A875E5000000002E36D095Button press is showing up in activity

Conclusion

From the observed behavior, we can that checks done on counter aren’t done well. Home Assistant is therefore exposed to BTHome replay attacks.

Instead of doing the proper check received_counter_value > last_counter_value it only verifies that values are not equal (like received_counter_value != last_counter_value) to differentiate one BLE advertisement from another.

BTHome events received by Home Assistant 2026.10.4 cannot be fully trusted.