mirror of
https://github.com/esphome/esphome.git
synced 2026-10-06 02:51:29 +00:00
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#ifdef USE_API
|
||||
#include "esphome/components/api/api_server.h"
|
||||
#endif
|
||||
#ifdef USE_API_SERVICES
|
||||
#include "esphome/components/api/user_services.h"
|
||||
#endif
|
||||
|
||||
@@ -148,7 +150,7 @@ void ComponentIterator::advance() {
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef USE_API
|
||||
#ifdef USE_API_SERVICES
|
||||
case IteratorState ::SERVICE:
|
||||
if (this->at_ >= api::global_api_server->get_user_services().size()) {
|
||||
advance_platform = true;
|
||||
@@ -383,7 +385,7 @@ void ComponentIterator::advance() {
|
||||
}
|
||||
bool ComponentIterator::on_end() { return true; }
|
||||
bool ComponentIterator::on_begin() { return true; }
|
||||
#ifdef USE_API
|
||||
#ifdef USE_API_SERVICES
|
||||
bool ComponentIterator::on_service(api::UserServiceDescriptor *service) { return true; }
|
||||
#endif
|
||||
#ifdef USE_CAMERA
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace esphome {
|
||||
|
||||
#ifdef USE_API
|
||||
#ifdef USE_API_SERVICES
|
||||
namespace api {
|
||||
class UserServiceDescriptor;
|
||||
} // namespace api
|
||||
@@ -45,7 +45,7 @@ class ComponentIterator {
|
||||
#ifdef USE_TEXT_SENSOR
|
||||
virtual bool on_text_sensor(text_sensor::TextSensor *text_sensor) = 0;
|
||||
#endif
|
||||
#ifdef USE_API
|
||||
#ifdef USE_API_SERVICES
|
||||
virtual bool on_service(api::UserServiceDescriptor *service);
|
||||
#endif
|
||||
#ifdef USE_CAMERA
|
||||
@@ -122,7 +122,7 @@ class ComponentIterator {
|
||||
#ifdef USE_TEXT_SENSOR
|
||||
TEXT_SENSOR,
|
||||
#endif
|
||||
#ifdef USE_API
|
||||
#ifdef USE_API_SERVICES
|
||||
SERVICE,
|
||||
#endif
|
||||
#ifdef USE_CAMERA
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
#define USE_API_CLIENT_DISCONNECTED_TRIGGER
|
||||
#define USE_API_NOISE
|
||||
#define USE_API_PLAINTEXT
|
||||
#define USE_API_YAML_SERVICES
|
||||
#define USE_API_SERVICES
|
||||
#define USE_MD5
|
||||
#define USE_MQTT
|
||||
#define USE_NETWORK
|
||||
|
||||
Reference in New Issue
Block a user