Skip to content

Commit

Permalink
Merge pull request #375 from iranl/unpair
Browse files Browse the repository at this point in the history
Fix Unpair
  • Loading branch information
technyon committed May 29, 2024
2 parents fbb2068 + 92ca7de commit 1438fb8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NukiOpenerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ void NukiOpenerWrapper::setPin(const uint16_t pin)
void NukiOpenerWrapper::unpair()
{
_nukiOpener.unPairNuki();
Preferences nukiBlePref;
nukiBlePref.begin("NukiHubopener", false);
nukiBlePref.clear();
nukiBlePref.end();
_deviceId->assignNewId();
_preferences->remove(preference_nuki_id_opener);
_paired = false;
Expand Down
4 changes: 4 additions & 0 deletions src/NukiWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ void NukiWrapper::setPin(const uint16_t pin)
void NukiWrapper::unpair()
{
_nukiLock.unPairNuki();
Preferences nukiBlePref;
nukiBlePref.begin("NukiHub", false);
nukiBlePref.clear();
nukiBlePref.end();
_deviceId->assignNewId();
_preferences->remove(preference_nuki_id_lock);
_paired = false;
Expand Down

0 comments on commit 1438fb8

Please sign in to comment.