fix review comments

This commit is contained in:
Tomasz Duda 2024-08-07 17:02:12 +02:00
parent e36959d7e5
commit ba14d1f6b9

View file

@ -56,49 +56,49 @@ void ComponentIterator::advance() {
#ifdef USE_COVER #ifdef USE_COVER
case IteratorState::COVER: case IteratorState::COVER:
process_entity_(App.get_covers(), &ComponentIterator::on_cover); this->process_entity_(App.get_covers(), &ComponentIterator::on_cover);
break; break;
#endif #endif
#ifdef USE_FAN #ifdef USE_FAN
case IteratorState::FAN: case IteratorState::FAN:
process_entity_(App.get_fans(), &ComponentIterator::on_fan); this->process_entity_(App.get_fans(), &ComponentIterator::on_fan);
break; break;
#endif #endif
#ifdef USE_LIGHT #ifdef USE_LIGHT
case IteratorState::LIGHT: case IteratorState::LIGHT:
process_entity_(App.get_lights(), &ComponentIterator::on_light); this->process_entity_(App.get_lights(), &ComponentIterator::on_light);
break; break;
#endif #endif
#ifdef USE_SENSOR #ifdef USE_SENSOR
case IteratorState::SENSOR: case IteratorState::SENSOR:
process_entity_(App.get_sensors(), &ComponentIterator::on_sensor); this->process_entity_(App.get_sensors(), &ComponentIterator::on_sensor);
break; break;
#endif #endif
#ifdef USE_SWITCH #ifdef USE_SWITCH
case IteratorState::SWITCH: case IteratorState::SWITCH:
process_entity_(App.get_switches(), &ComponentIterator::on_switch); this->process_entity_(App.get_switches(), &ComponentIterator::on_switch);
break; break;
#endif #endif
#ifdef USE_BUTTON #ifdef USE_BUTTON
case IteratorState::BUTTON: case IteratorState::BUTTON:
process_entity_(App.get_buttons(), &ComponentIterator::on_button); this->process_entity_(App.get_buttons(), &ComponentIterator::on_button);
break; break;
#endif #endif
#ifdef USE_TEXT_SENSOR #ifdef USE_TEXT_SENSOR
case IteratorState::TEXT_SENSOR: case IteratorState::TEXT_SENSOR:
process_entity_(App.get_text_sensors(), &ComponentIterator::on_text_sensor); this->process_entity_(App.get_text_sensors(), &ComponentIterator::on_text_sensor);
break; break;
#endif #endif
#ifdef USE_API #ifdef USE_API
case IteratorState::SERVICE: case IteratorState::SERVICE:
process_entity_(api::global_api_server->get_user_services(), &ComponentIterator::on_service); this->process_entity_(api::global_api_server->get_user_services(), &ComponentIterator::on_service);
break; break;
#endif #endif
@ -108,85 +108,85 @@ void ComponentIterator::advance() {
if (esp32_camera::global_esp32_camera) { if (esp32_camera::global_esp32_camera) {
cameras.push_back(esp32_camera::global_esp32_camera); cameras.push_back(esp32_camera::global_esp32_camera);
} }
process_entity_(cameras, &ComponentIterator::on_camera); this->process_entity_(cameras, &ComponentIterator::on_camera);
} break; } break;
#endif #endif
#ifdef USE_CLIMATE #ifdef USE_CLIMATE
case IteratorState::CLIMATE: case IteratorState::CLIMATE:
process_entity_(App.get_climates(), &ComponentIterator::on_climate); this->process_entity_(App.get_climates(), &ComponentIterator::on_climate);
break; break;
#endif #endif
#ifdef USE_NUMBER #ifdef USE_NUMBER
case IteratorState::NUMBER: case IteratorState::NUMBER:
process_entity_(App.get_numbers(), &ComponentIterator::on_number); this->process_entity_(App.get_numbers(), &ComponentIterator::on_number);
break; break;
#endif #endif
#ifdef USE_DATETIME_DATE #ifdef USE_DATETIME_DATE
case IteratorState::DATETIME_DATE: case IteratorState::DATETIME_DATE:
process_entity_(App.get_dates(), &ComponentIterator::on_date); this->process_entity_(App.get_dates(), &ComponentIterator::on_date);
break; break;
#endif #endif
#ifdef USE_DATETIME_TIME #ifdef USE_DATETIME_TIME
case IteratorState::DATETIME_TIME: case IteratorState::DATETIME_TIME:
process_entity_(App.get_times(), &ComponentIterator::on_time); this->process_entity_(App.get_times(), &ComponentIterator::on_time);
break; break;
#endif #endif
#ifdef USE_DATETIME_DATETIME #ifdef USE_DATETIME_DATETIME
case IteratorState::DATETIME_DATETIME: case IteratorState::DATETIME_DATETIME:
process_entity_(App.get_datetimes(), &ComponentIterator::on_datetime); this->process_entity_(App.get_datetimes(), &ComponentIterator::on_datetime);
break; break;
#endif #endif
#ifdef USE_TEXT #ifdef USE_TEXT
case IteratorState::TEXT: case IteratorState::TEXT:
process_entity_(App.get_texts(), &ComponentIterator::on_text); this->process_entity_(App.get_texts(), &ComponentIterator::on_text);
break; break;
#endif #endif
#ifdef USE_SELECT #ifdef USE_SELECT
case IteratorState::SELECT: case IteratorState::SELECT:
process_entity_(App.get_selects(), &ComponentIterator::on_select); this->process_entity_(App.get_selects(), &ComponentIterator::on_select);
break; break;
#endif #endif
#ifdef USE_LOCK #ifdef USE_LOCK
case IteratorState::LOCK: case IteratorState::LOCK:
process_entity_(App.get_locks(), &ComponentIterator::on_lock); this->process_entity_(App.get_locks(), &ComponentIterator::on_lock);
break; break;
#endif #endif
#ifdef USE_VALVE #ifdef USE_VALVE
case IteratorState::VALVE: case IteratorState::VALVE:
process_entity_(App.get_valves(), &ComponentIterator::on_valve); this->process_entity_(App.get_valves(), &ComponentIterator::on_valve);
break; break;
#endif #endif
#ifdef USE_MEDIA_PLAYER #ifdef USE_MEDIA_PLAYER
case IteratorState::MEDIA_PLAYER: case IteratorState::MEDIA_PLAYER:
process_entity_(App.get_media_players(), &ComponentIterator::on_media_player); this->process_entity_(App.get_media_players(), &ComponentIterator::on_media_player);
break; break;
#endif #endif
#ifdef USE_ALARM_CONTROL_PANEL #ifdef USE_ALARM_CONTROL_PANEL
case IteratorState::ALARM_CONTROL_PANEL: case IteratorState::ALARM_CONTROL_PANEL:
process_entity_(App.get_alarm_control_panels(), &ComponentIterator::on_alarm_control_panel); this->process_entity_(App.get_alarm_control_panels(), &ComponentIterator::on_alarm_control_panel);
break; break;
#endif #endif
#ifdef USE_EVENT #ifdef USE_EVENT
case IteratorState::EVENT: case IteratorState::EVENT:
process_entity_(App.get_events(), &ComponentIterator::on_event); this->process_entity_(App.get_events(), &ComponentIterator::on_event);
break; break;
#endif #endif
#ifdef USE_UPDATE #ifdef USE_UPDATE
case IteratorState::UPDATE: case IteratorState::UPDATE:
process_entity_(App.get_updates(), &ComponentIterator::on_update); this->process_entity_(App.get_updates(), &ComponentIterator::on_update);
break; break;
#endif #endif