mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 08:41:59 +00:00
Co-authored-by: J. Nick Koston <nick+github@koston.org> Co-authored-by: J. Nick Koston <nick@home-assistant.io> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
32 lines
778 B
YAML
32 lines
778 B
YAML
esphome:
|
|
name: build-info-test
|
|
host:
|
|
api:
|
|
logger:
|
|
|
|
text_sensor:
|
|
- platform: template
|
|
name: "Config Hash"
|
|
id: config_hash_sensor
|
|
update_interval: 100ms
|
|
lambda: |-
|
|
char buf[16];
|
|
snprintf(buf, sizeof(buf), "0x%08x", App.get_config_hash());
|
|
return std::string(buf);
|
|
- platform: template
|
|
name: "Build Time"
|
|
id: build_time_sensor
|
|
update_interval: 100ms
|
|
lambda: |-
|
|
char buf[32];
|
|
snprintf(buf, sizeof(buf), "%ld", (long)App.get_build_time());
|
|
return std::string(buf);
|
|
- platform: template
|
|
name: "Build Time String"
|
|
id: build_time_str_sensor
|
|
update_interval: 100ms
|
|
lambda: |-
|
|
char buf[Application::BUILD_TIME_STR_SIZE];
|
|
App.get_build_time_string(buf);
|
|
return std::string(buf);
|