ESPHome 2025.5.2
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
number.h
Go to the documentation of this file.
1#pragma once
2
5#include "esphome/core/log.h"
7
8namespace esphome {
9namespace opentherm {
10
11// Just a simple number, which stores the number
13 protected:
14 void control(float value) override;
15 void setup() override;
16 void dump_config() override;
17
18 float initial_value_{NAN};
19 bool restore_value_{false};
20
22
23 public:
24 void set_min_value(float min_value) override { this->traits.set_min_value(min_value); }
25 void set_max_value(float max_value) override { this->traits.set_max_value(max_value); }
26 void set_initial_value(float initial_value) { initial_value_ = initial_value; }
27 void set_restore_value(bool restore_value) { this->restore_value_ = restore_value; }
28};
29
30} // namespace opentherm
31} // namespace esphome
Base-class for all numbers.
Definition number.h:39
NumberTraits traits
Definition number.h:49
void set_min_value(float min_value)
void set_max_value(float max_value)
void set_min_value(float min_value) override
Definition number.h:24
ESPPreferenceObject pref_
Definition number.h:21
void set_restore_value(bool restore_value)
Definition number.h:27
void control(float value) override
Definition number.cpp:8
void set_initial_value(float initial_value)
Definition number.h:26
void set_max_value(float max_value) override
Definition number.h:25
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7