fix component API include compile error
This commit is contained in:
@@ -30,7 +30,9 @@ void Hauslane::setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// register ESPHome API service named "command"
|
// register ESPHome API service named "command"
|
||||||
|
#if defined(USE_API)
|
||||||
register_service(&Hauslane::command, "command", {"command"});
|
register_service(&Hauslane::command, "command", {"command"});
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hauslane::loop() {
|
void Hauslane::loop() {
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
#include "esphome/components/uart/uart.h"
|
#include "esphome/components/uart/uart.h"
|
||||||
|
#ifdef USE_API
|
||||||
#include "esphome/components/api/custom_api_device.h"
|
#include "esphome/components/api/custom_api_device.h"
|
||||||
|
#endif
|
||||||
#ifdef USE_LIGHT
|
#ifdef USE_LIGHT
|
||||||
#include "esphome/components/light/light_output.h"
|
#include "esphome/components/light/light_output.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ logger:
|
|||||||
level: DEBUG
|
level: DEBUG
|
||||||
|
|
||||||
api:
|
api:
|
||||||
|
custom_services: true
|
||||||
password: !secret api_password
|
password: !secret api_password
|
||||||
|
|
||||||
ota:
|
ota:
|
||||||
|
|||||||
Reference in New Issue
Block a user