mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-19 20:53:26 +02:00
8e75980ebd
* Cleanup dashboard JS * Add vscode * Save start_mark/end_mark * Updates * Updates * Remove need for cv.nameable It's a bit hacky but removes so much bloat from integrations * Add enum helper * Document APIs, and Improvements * Fixes * Fixes * Update PULL_REQUEST_TEMPLATE.md * Updates * Updates * Updates
18 lines
612 B
C++
18 lines
612 B
C++
#include "version_text_sensor.h"
|
|
#include "esphome/core/log.h"
|
|
#include "esphome/core/application.h"
|
|
|
|
namespace esphome {
|
|
namespace version {
|
|
|
|
static const char *TAG = "version.text_sensor";
|
|
|
|
void VersionTextSensor::setup() { this->publish_state(ESPHOME_VERSION " " + App.get_compilation_time()); }
|
|
float VersionTextSensor::get_setup_priority() const { return setup_priority::DATA; }
|
|
|
|
std::string VersionTextSensor::unique_id() { return get_mac_address() + "-version"; }
|
|
void VersionTextSensor::dump_config() { LOG_TEXT_SENSOR("", "Version Text Sensor", this); }
|
|
|
|
} // namespace version
|
|
} // namespace esphome
|