[version] Use a user provided default constructor for VersionTextSensor (#19139)

This commit is contained in:
J. Nick Koston
2026-09-16 20:32:33 +12:00
committed by GitHub
parent 0c1cf6d0a9
commit 8ffa10f86c
@@ -7,6 +7,8 @@ namespace esphome::version {
class VersionTextSensor final : public text_sensor::TextSensor, public Component {
public:
// User provided, not "= default": `new(p) VersionTextSensor()` would zero-fill .bss that is already zero.
VersionTextSensor() {}
void set_hide_hash(bool hide_hash) { this->hide_hash_ = hide_hash; }
void set_hide_timestamp(bool hide_timestamp) { this->hide_timestamp_ = hide_timestamp; }
void setup() override;