ESPHome 2025.5.0
Loading...
Searching...
No Matches
number_traits.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome {
7namespace number {
8
14
16 public:
17 // Set/get the number value boundaries.
18 void set_min_value(float min_value) { min_value_ = min_value; }
19 float get_min_value() const { return min_value_; }
20 void set_max_value(float max_value) { max_value_ = max_value; }
21 float get_max_value() const { return max_value_; }
22
23 // Set/get the step size for incrementing or decrementing the number value.
24 void set_step(float step) { step_ = step; }
25 float get_step() const { return step_; }
26
27 // Set/get the frontend mode.
28 void set_mode(NumberMode mode) { this->mode_ = mode; }
29 NumberMode get_mode() const { return this->mode_; }
30
31 protected:
32 float min_value_ = NAN;
33 float max_value_ = NAN;
34 float step_ = NAN;
36};
37
38} // namespace number
39} // namespace esphome
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
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7