Bluetooth-Devices / bthome-ble

Parser for BTHome BLE devices
https://bthome.io/
MIT License
67 stars 12 forks source link

fix: decryption bug fixed #80

Closed Ernst79 closed 1 year ago

Ernst79 commented 1 year ago

fix: decryption bug fixed

fix for https://github.com/home-assistant/core/issues/94524

In the decryption process, the BTHome Device Information byte was hardcoded to set it to x41, even when a device had specified something different. E.g. the Shelly BLU button is using x45, as it is a non-regular updating device. As a result, decryption always failed when not using x41. This is now fixed.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (74b38b7) 77.28% compared to head (dfb12e6) 77.28%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #80 +/- ## ======================================= Coverage 77.28% 77.28% ======================================= Files 6 6 Lines 471 471 Branches 71 71 ======================================= Hits 364 364 Misses 83 83 Partials 24 24 ``` | [Impacted Files](https://app.codecov.io/gh/Bluetooth-Devices/bthome-ble/pull/80?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bluetooth-Devices) | Coverage Δ | | |---|---|---| | [src/bthome\_ble/\_\_init\_\_.py](https://app.codecov.io/gh/Bluetooth-Devices/bthome-ble/pull/80?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bluetooth-Devices#diff-c3JjL2J0aG9tZV9ibGUvX19pbml0X18ucHk=) | `100.00% <100.00%> (ø)` | | | [src/bthome\_ble/parser.py](https://app.codecov.io/gh/Bluetooth-Devices/bthome-ble/pull/80?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bluetooth-Devices#diff-c3JjL2J0aG9tZV9ibGUvcGFyc2VyLnB5) | `83.33% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.