Bluetooth-Devices / govee-ble

Manage Govee BLE devices
Apache License 2.0
19 stars 10 forks source link

feat: log data as hex #53

Closed PierreAronnax closed 1 year ago

PierreAronnax commented 1 year ago

Logging binary data is quite unreadable when it contains readable characters. Always log data as hex.

2022-12-17 10:28:48.080 DEBUG (MainThread) [govee_ble.parser] Parsing Govee sensor: 1 b'\x01\x01\x01\x802nd\x00\x03' becomes: 2022-12-17 10:28:48.080 DEBUG (MainThread) [govee_ble.parser] Parsing Govee sensor: 1 b'\x01\x01\x01\x80\x32\x6e\x64\x00\x03'

codecov[bot] commented 1 year ago

Codecov Report

Base: 79.88% // Head: 79.44% // Decreases project coverage by -0.44% :warning:

Coverage data is based on head (1c3975d) compared to base (c0a54eb). Patch coverage: 70.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #53 +/- ## ========================================== - Coverage 79.88% 79.44% -0.45% ========================================== Files 2 2 Lines 174 180 +6 Branches 29 34 +5 ========================================== + Hits 139 143 +4 - Misses 30 32 +2 Partials 5 5 ``` | [Impacted Files](https://codecov.io/gh/Bluetooth-Devices/govee-ble/pull/53?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/govee\_ble/parser.py](https://codecov.io/gh/Bluetooth-Devices/govee-ble/pull/53/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2dvdmVlX2JsZS9wYXJzZXIucHk=) | `78.85% <66.66%> (-0.44%)` | :arrow_down: | | [src/govee\_ble/\_\_init\_\_.py](https://codecov.io/gh/Bluetooth-Devices/govee-ble/pull/53/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2dvdmVlX2JsZS9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

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