Closed jacobericson closed 2 years ago
Tested it and it works fine. Thanks for your mod !
If I recall my review correctly, there is at least one case where the pin logic is broken.
If I recall my review correctly, there is at least one case where the pin logic is broken.
With a basic use case I was able to confirm this PR works fine. Do you remember any details of the broken case?
Not at the computer, but I recall something somewhere which does not account for something.
The following signature has changed. I think it's called elsewhere using the old signature. This is the new signature:
def pair_setup_m1_m2(self, pw)
Not at the computer, but I recall something somewhere which does not account for something. The following signature has changed. I think it's called elsewhere using the old signature. This is the new signature: def pair_setup_m1_m2(self, pw)
I couldn't find more than 1 usage of pair_setup_m1_m2. pair_setup (which calls ...m1_m2) does have an extra usage which doesn't fulfill all args but this is part of request(self, req)
, which isn't used anywhere at all. Changing the signature of both pair_setup and pair_setup_m1_m2 to default pw
to None looks like an acceptable solution though.
I wasn't able to initiate a request for the setup pin or streaming pin, so can't test if there is any broken logic anywhere.
getDevicePassword() is an object of DeviceProperties and not Hap.
My solution is just to pass it through the calls since the DeviceProperties instance is scoped to ap2-receiver and has no visibly to Hap, but regardless it should be fixed.