[text_sensor] Use a user provided default constructor (#19112)

This commit is contained in:
J. Nick Koston
2026-09-16 20:38:10 +12:00
committed by GitHub
parent 3180381a26
commit 7e750ec611
+2 -1
View File
@@ -29,7 +29,8 @@ class TextSensor : public EntityBase {
public:
std::string state;
TextSensor() = default;
// User provided, not "= default": `new(p) TextSensor()` would zero-fill .bss that is already zero.
TextSensor() {}
~TextSensor() = default;
/// Getter-syntax for .state.