Skip to content

Commit

Permalink
Update NukiWrapper.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
iranl committed Apr 1, 2024
1 parent 0905dd8 commit f511163
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions NukiWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,8 +1023,8 @@ void NukiWrapper::onConfigUpdateReceived(const char *value)
{
String keystr = json[advancedKeys[i]];
unsigned char keyvalue[2];
keyvalue[1] = (uint8_t)atoi(keystr.substring(0, 2));
keyvalue[2] = (uint8_t)atoi(keystr.substring(3, 5));
keyvalue[1] = (uint8_t)atoi(keystr.substring(0, 2).c_str());
keyvalue[2] = (uint8_t)atoi(keystr.substring(3, 5).c_str());
if(keyvalue[0] >= 0 && keyvalue[0] <= 23 && keyvalue[1] >= 0 && keyvalue[1] <= 59)
{
if(_nukiAdvancedConfig.nightModeStartTime == keyvalue) jsonResult[advancedKeys[i]] = "unchanged";
Expand All @@ -1036,8 +1036,8 @@ void NukiWrapper::onConfigUpdateReceived(const char *value)
{
String keystr = json[advancedKeys[i]];
unsigned char keyvalue[2];
keyvalue[1] = (uint8_t)atoi(keystr.substring(0, 2));
keyvalue[2] = (uint8_t)atoi(keystr.substring(3, 5));
keyvalue[1] = (uint8_t)atoi(keystr.substring(0, 2).c_str());
keyvalue[2] = (uint8_t)atoi(keystr.substring(3, 5).c_str());
if(keyvalue[0] >= 0 && keyvalue[0] <= 23 && keyvalue[1] >= 0 && keyvalue[1] <= 59)
{
if(_nukiAdvancedConfig.nightModeEndTime == keyvalue) jsonResult[advancedKeys[i]] = "unchanged";
Expand Down

0 comments on commit f511163

Please sign in to comment.