ESPHome  2022.9.1
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_ESP32_IGNORE_EFUSE_MAC_CRC
72 #define USE_IMPROV
73 #define USE_SOCKET_IMPL_BSD_SOCKETS
74 #define USE_WIFI_11KV_SUPPORT
75 #define USE_BLUETOOTH_PROXY
76 
77 #ifdef USE_ARDUINO
78 #define USE_ARDUINO_VERSION_CODE VERSION_CODE(1, 0, 6)
79 #define USE_ETHERNET
80 #endif
81 
82 #ifdef USE_ESP_IDF
83 #define USE_ARDUINO_VERSION_CODE VERSION_CODE(4, 3, 0)
84 #endif
85 #endif
86 
87 // ESP8266-specific feature flags
88 #ifdef USE_ESP8266
89 #define USE_ADC_SENSOR_VCC
90 #define USE_ARDUINO_VERSION_CODE VERSION_CODE(3, 0, 2)
91 #define USE_ESP8266_PREFERENCES_FLASH
92 #define USE_HTTP_REQUEST_ESP8266_HTTPS
93 #define USE_SOCKET_IMPL_LWIP_TCP
94 #endif
95 
96 // Disabled feature flags
97 //#define USE_BSEC // Requires a library with proprietary license.
98 
99 #define USE_DASHBOARD_IMPORT
100 
101 // Dummy firmware payload for shelly_dimmer
102 #define USE_SHD_FIRMWARE_MAJOR_VERSION 56
103 #define USE_SHD_FIRMWARE_MINOR_VERSION 5
104 #define USE_SHD_FIRMWARE_DATA \
105  {}