bitfocus / companion-module-vizio-smartcast

MIT License
2 stars 2 forks source link

Fixed pairing bug #8

Closed MichaelAllen closed 4 years ago

MichaelAllen commented 4 years ago

Fixes : #7

This PR fixes the pairing function by moving the tv connection up to the instance level, rather than recreating it every time an action ran. The tv object needed to stay consistent between the start pair and finish pair steps because internally it is tracking a request token that has to stay the same or the pairing fails.

I also fixed a typo in the action case statement. The action id is 'pin', but the case statement was looking for 'enter_pin'.

Finally, I added some more logging around the pairing process.