Compare commits

..
4 changed files with 3 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ class Number;
*/
class Number : public EntityBase {
public:
float state{};
float state;
void publish_state(float state);
@@ -3,8 +3,6 @@
namespace esphome::template_ {
TemplateNumber::TemplateNumber() {}
static const char *const TAG = "template.number";
void TemplateNumber::setup() {
@@ -10,9 +10,6 @@ namespace esphome::template_ {
class TemplateNumber final : public number::Number, public PollingComponent {
public:
// User provided, not "= default": `new(p) TemplateNumber()` would zero-fill .bss that is already zero.
// Defined out of line so the member constructors are not inlined into every construction site.
TemplateNumber();
template<typename F> void set_template(F &&f) { this->f_.set(std::forward<F>(f)); }
void setup() override;
@@ -8,6 +8,8 @@ namespace esphome::template_ {
class TemplateBinaryOutput final : public output::BinaryOutput {
public:
// User provided, not "= default": `new(p) TemplateBinaryOutput()` would zero-fill .bss that is already zero.
TemplateBinaryOutput() {}
Trigger<bool> *get_trigger() { return &this->trigger_; }
protected: