use NukiPinState enum for isPinValid() methods

This commit is contained in:
technyon
2025-02-03 15:45:52 +01:00
parent 31fed84cae
commit ca2f354e5f
2 changed files with 2 additions and 2 deletions

View File

@@ -441,7 +441,7 @@ bool NukiOpenerWrapper::isPinSet()
bool NukiOpenerWrapper::isPinValid() 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) void NukiOpenerWrapper::setPin(const uint16_t pin)

View File

@@ -465,7 +465,7 @@ bool NukiWrapper::isPinSet()
bool NukiWrapper::isPinValid() 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) void NukiWrapper::setPin(const uint16_t pin)