1
0
mirror of https://github.com/esphome/esphome.git synced 2025-07-30 02:39:38 +01:00
Files
.devcontainer
.github
.vscode
docker
esphome
script
tests
component_tests
components
dashboard
test_build_components
test_packages
unit_tests
.gitignore
README.md
custom.h
dummy_main.cpp
pnglogo.png
.clang-format
.clang-tidy
.coveragerc
.dockerignore
.editorconfig
.flake8
.gitattributes
.gitignore
.pre-commit-config.yaml
.yamllint
CODEOWNERS
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
MANIFEST.in
README.md
platformio.ini
pyproject.toml
requirements.txt
requirements_dev.txt
requirements_optional.txt
requirements_test.txt
sdkconfig.defaults
esphome/tests/dummy_main.cpp
2024-05-16 14:01:09 +12:00

35 lines
1.1 KiB
C++

// Dummy main.cpp file for the PlatformIO project in the git repository.
// Primarily used to get IDE integration working (so the contents here don't
// matter at all, as long as it compiles).
// Not used during runtime nor for CI.
#include <esphome/components/gpio/switch/gpio_switch.h>
#include <esphome/components/logger/logger.h>
#include <esphome/components/esphome/ota/ota_esphome.h>
#include <esphome/components/wifi/wifi_component.h>
#include <esphome/core/application.h>
using namespace esphome;
void setup() {
App.pre_setup("livingroom", "LivingRoom", "LivingRoomArea", "comment", __DATE__ ", " __TIME__, false);
auto *log = new logger::Logger(115200, 512); // NOLINT
log->pre_setup();
log->set_uart_selection(logger::UART_SELECTION_UART0);
App.register_component(log);
auto *wifi = new wifi::WiFiComponent(); // NOLINT
App.register_component(wifi);
wifi::WiFiAP ap;
ap.set_ssid("Test SSID");
ap.set_password("password1");
wifi->add_sta(ap);
auto *ota = new esphome::ESPHomeOTAComponent(); // NOLINT
ota->set_port(8266);
App.setup();
}
void loop() { App.loop(); }