Skip to content

Commit

Permalink
use NukiPinState enum for isPinValid() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
technyon committed Feb 3, 2025
1 parent 31fed84 commit ca2f354
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/NukiOpenerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ bool NukiOpenerWrapper::isPinSet()

bool NukiOpenerWrapper::isPinValid()
{
return _preferences->getInt(preference_opener_pin_status, (int)NukiPinState::NotConfigured) == 1;
return _preferences->getInt(preference_opener_pin_status, (int)NukiPinState::NotConfigured) == (int)NukiPinState::Valid;
}

void NukiOpenerWrapper::setPin(const uint16_t pin)
Expand Down
2 changes: 1 addition & 1 deletion src/NukiWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ bool NukiWrapper::isPinSet()

bool NukiWrapper::isPinValid()
{
return _preferences->getInt(preference_lock_pin_status, (int)NukiPinState::NotConfigured) == 1;
return _preferences->getInt(preference_lock_pin_status, (int)NukiPinState::NotConfigured) == (int)NukiPinState::Valid;
}

void NukiWrapper::setPin(const uint16_t pin)
Expand Down

0 comments on commit ca2f354

Please sign in to comment.