ESPHome  2022.12.8
defines.h
Go to the documentation of this file.
1 #pragma once
2 
3 // This file is not used by the runtime, instead, a version is generated during
4 // compilation with only the relevant feature flags for the current build.
5 //
6 // This file is only used by static analyzers and IDEs.
7 
8 #include "esphome/core/macros.h"
9 
10 // Informative flags
11 #define ESPHOME_BOARD "dummy_board"
12 #define ESPHOME_PROJECT_NAME "dummy project"
13 #define ESPHOME_PROJECT_VERSION "v2"
14 #define ESPHOME_VARIANT "ESP32"
15 
16 // Feature flags
17 #define USE_API
18 #define USE_API_NOISE
19 #define USE_API_PLAINTEXT
20 #define USE_BINARY_SENSOR
21 #define USE_BUTTON
22 #define USE_CLIMATE
23 #define USE_COVER
24 #define USE_DEEP_SLEEP
25 #define USE_FAN
26 #define USE_GRAPH
27 #define USE_HOMEASSISTANT_TIME
28 #define USE_LIGHT
29 #define USE_LOCK
30 #define USE_LOGGER
31 #define USE_MDNS
32 #define USE_MEDIA_PLAYER
33 #define USE_MQTT
34 #define USE_NUMBER
35 #define USE_OTA
36 #define USE_OTA_PASSWORD
37 #define USE_OTA_STATE_CALLBACK
38 #define USE_POWER_SUPPLY
39 #define USE_QR_CODE
40 #define USE_SELECT
41 #define USE_SENSOR
42 #define USE_STATUS_LED
43 #define USE_SWITCH
44 #define USE_TEXT_SENSOR
45 #define USE_TIME
46 #define USE_TOUCHSCREEN
47 #define USE_UART_DEBUGGER
48 #define USE_WIFI
49 
50 // Arduino-specific feature flags
51 #ifdef USE_ARDUINO
52 #define USE_CAPTIVE_PORTAL
53 #define USE_JSON
54 #define USE_NEXTION_TFT_UPLOAD
55 #define USE_PROMETHEUS
56 #define USE_WEBSERVER
57 #define USE_WEBSERVER_PORT 80 // NOLINT
58 #define USE_WIFI_WPA2_EAP
59 #endif
60 
61 // IDF-specific feature flags
62 #ifdef USE_ESP_IDF
63 #define USE_MQTT_IDF_ENQUEUE
64 #endif
65 
66 // ESP32-specific feature flags
67 #ifdef USE_ESP32
68 #define USE_ESP32_BLE_CLIENT
69 #define USE_ESP32_BLE_SERVER
70 #define USE_ESP32_CAMERA
71 #define USE_IMPROV
72 #define USE_SOCKET_IMPL_BSD_SOCKETS
73 #define USE_WIFI_11KV_SUPPORT
74 #define USE_BLUETOOTH_PROXY
75 
76 #ifdef USE_ARDUINO
77 #define USE_ARDUINO_VERSION_CODE VERSION_CODE(2, 0, 5)
78 #define USE_ETHERNET
79 #endif
80 
81 #ifdef USE_ESP_IDF
82 #define USE_ESP_IDF_VERSION_CODE VERSION_CODE(4, 4, 2)
83 #endif
84 #endif
85 
86 // ESP8266-specific feature flags
87 #ifdef USE_ESP8266
88 #define USE_ADC_SENSOR_VCC
89 #define USE_ARDUINO_VERSION_CODE VERSION_CODE(3, 0, 2)
90 #define USE_ESP8266_PREFERENCES_FLASH
91 #define USE_HTTP_REQUEST_ESP8266_HTTPS
92 #define USE_SOCKET_IMPL_LWIP_TCP
93 
94 // Dummy firmware payload for shelly_dimmer
95 #define USE_SHD_FIRMWARE_MAJOR_VERSION 56
96 #define USE_SHD_FIRMWARE_MINOR_VERSION 5
97 #define USE_SHD_FIRMWARE_DATA \
98  {}
99 
100 #endif
101 
102 // Disabled feature flags
103 //#define USE_BSEC // Requires a library with proprietary license.
104 
105 #define USE_DASHBOARD_IMPORT