ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
number_traits.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome::number {
7
13
15 public:
16 // Set/get the number value boundaries.
17 void set_min_value(float min_value) { min_value_ = min_value; }
18 float get_min_value() const { return min_value_; }
19 void set_max_value(float max_value) { max_value_ = max_value; }
20 float get_max_value() const { return max_value_; }
21
22 // Set/get the step size for incrementing or decrementing the number value.
23 void set_step(float step) { step_ = step; }
24 float get_step() const { return step_; }
25
26 // Set/get the frontend mode.
27 void set_mode(NumberMode mode) { this->mode_ = mode; }
28 NumberMode get_mode() const { return this->mode_; }
29
30 protected:
31 float min_value_ = NAN;
32 float max_value_ = NAN;
33 float step_ = NAN;
35};
36
37} // namespace esphome::number
BedjetMode mode
BedJet operating mode.
void set_min_value(float min_value)
void set_mode(NumberMode mode)
void set_max_value(float max_value)
NumberMode get_mode() const