Closed Ernst79 closed 1 year ago
Base: 75.39% // Head: 75.33% // Decreases project coverage by -0.05%
:warning:
Coverage data is based on head (
21b9390
) compared to base (849deab
). Patch coverage: 75.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Fine with us!
Although, now that I look at it, it's a change for the sake of change itself. I necessitates additional if-s to handle, so it may be simpler to just leave it as is. That way, encrypt/decrypt functions can be reused verbatim from v1.
v2 shold be about 'this is the better way to do this' and not 'we made it work like somebody else'. Remove IMHO, or explicitly explain why it is like that in documentation
As discussed in #20, this PR proposes to remove the
cipher.update(b"\x11")
in the decryption code for BTHome V2. This will remove the need to apply this in the sensor firmware code as well.In V1, this
cipher.update(b"\x11")
will be remained as it was, to keep backward compatibility. V2 isn't used most likely at the moment, as Home Assistant will be updated in the December release with V2 support.