update library; adjusted update behavior

This commit is contained in:
reaw 2024-02-14 05:46:34 +07:00
parent c08a762c00
commit ee4126f0a0
3 changed files with 11 additions and 2 deletions

View file

@ -712,6 +712,14 @@ void ISEDisplay::updateAirPurifierStateStandby()
void ISEDisplay::updateAirPurifierState()
{
//check for page
if(currentPage != 2){
return;
}
else if(currentPage ==1){
updateAirPurifierStateStandby();
return;
}
// Get the state
bool state = strcmp(pm_switch->getValue(), "on") == 0;
ESP_LOGI("ISEDisplay", "Updating air purifier state to: %d", state);