You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An OTP starting with 0 could never complete setup. The flow collects the
code as a string and then cast it with int() before handing it over, so 012345 went out as 12345; the vendor rejected five digits as invalid, and
retyping the same correct code failed identically every time with nothing to
suggest why. Roughly one code in ten starts with a zero.
Found while merging @baudneo's cync-lan-lib#1 - he flagged
the same bug in the library, and fixing it there (0.10.1, which this now
requires) only helps if this end stops destroying the zero first. Both halves
were needed.
While covering it, test_otp_step_cannot_connect turned out to assert invalid_otp - the opposite of its own name. It passed only because int("not-a-number") raised ValueError before send_otp was ever reached,
so the mocked error it exists to test was never exercised. Corrected, and the invalid_otp path it had been accidentally covering now has a test of its own.
requirements_test.txt tracks the manifest exactly again.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
An OTP starting with
0could never complete setup. The flow collects thecode as a string and then cast it with
int()before handing it over, so012345went out as12345; the vendor rejected five digits as invalid, andretyping the same correct code failed identically every time with nothing to
suggest why. Roughly one code in ten starts with a zero.
Found while merging @baudneo's
cync-lan-lib#1 - he flagged
the same bug in the library, and fixing it there (0.10.1, which this now
requires) only helps if this end stops destroying the zero first. Both halves
were needed.
While covering it,
test_otp_step_cannot_connectturned out to assertinvalid_otp- the opposite of its own name. It passed only becauseint("not-a-number")raisedValueErrorbeforesend_otpwas ever reached,so the mocked error it exists to test was never exercised. Corrected, and the
invalid_otppath it had been accidentally covering now has a test of its own.requirements_test.txttracks the manifest exactly again.This discussion was created from the release cync_lan (Home Assistant custom_component) v2.10.1.
All reactions