1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 20:02:22 +01:00

Allow setting creator project name and version into code (#1872)

This commit is contained in:
Jesse Hills
2021-06-09 13:04:00 +12:00
committed by GitHub
parent b80f3fdec9
commit 5cf18235e3
9 changed files with 113 additions and 51 deletions

View File

@@ -664,6 +664,10 @@ DeviceInfoResponse APIConnection::device_info(const DeviceInfoRequest &msg) {
#endif
#ifdef USE_DEEP_SLEEP
resp.has_deep_sleep = deep_sleep::global_has_deep_sleep;
#endif
#ifdef ESPHOME_PROJECT_NAME
resp.project_name = ESPHOME_PROJECT_NAME;
resp.project_version = ESPHOME_PROJECT_VERSION;
#endif
return resp;
}