ESPHome  2024.3.2
Public Member Functions | Protected Attributes
esphome::number::NumberTraits Class Reference

#include <number_traits.h>

Inheritance diagram for esphome::number::NumberTraits:
esphome::EntityBase_DeviceClass esphome::EntityBase_UnitOfMeasurement

Public Member Functions

void set_min_value (float min_value)
float get_min_value () const
void set_max_value (float max_value)
float get_max_value () const
void set_step (float step)
float get_step () const
void set_mode (NumberMode mode)
NumberMode get_mode () const
- Public Member Functions inherited from esphome::EntityBase_DeviceClass
std::string get_device_class ()
 Get the device class, using the manual override if set. More...
void set_device_class (const char *device_class)
 Manually set the device class. More...
- Public Member Functions inherited from esphome::EntityBase_UnitOfMeasurement
std::string get_unit_of_measurement ()
 Get the unit of measurement, using the manual override if set. More...
void set_unit_of_measurement (const char *unit_of_measurement)
 Manually set the unit of measurement. More...

Protected Attributes

float min_value_ = NAN
float max_value_ = NAN
float step_ = NAN
NumberMode mode_ {NUMBER_MODE_AUTO}
- Protected Attributes inherited from esphome::EntityBase_DeviceClass
const char * device_class_ {nullptr}
 Device class override. More...
- Protected Attributes inherited from esphome::EntityBase_UnitOfMeasurement
const char * unit_of_measurement_ {nullptr}
 Unit of measurement override. More...

Detailed Description

Definition at line 15 of file number_traits.h.

Member Function Documentation

◆ get_max_value()

float esphome::number::NumberTraits::get_max_value ( ) const

Definition at line 21 of file number_traits.h.

◆ get_min_value()

float esphome::number::NumberTraits::get_min_value ( ) const

Definition at line 19 of file number_traits.h.

◆ get_mode()

NumberMode esphome::number::NumberTraits::get_mode ( ) const

Definition at line 29 of file number_traits.h.

◆ get_step()

float esphome::number::NumberTraits::get_step ( ) const

Definition at line 25 of file number_traits.h.

◆ set_max_value()

void esphome::number::NumberTraits::set_max_value ( float  max_value)

Definition at line 20 of file number_traits.h.

◆ set_min_value()

void esphome::number::NumberTraits::set_min_value ( float  min_value)

Definition at line 18 of file number_traits.h.

◆ set_mode()

void esphome::number::NumberTraits::set_mode ( NumberMode  mode)

Definition at line 28 of file number_traits.h.

◆ set_step()

void esphome::number::NumberTraits::set_step ( float  step)

Definition at line 24 of file number_traits.h.

Field Documentation

◆ max_value_

float esphome::number::NumberTraits::max_value_ = NAN

Definition at line 33 of file number_traits.h.

◆ min_value_

float esphome::number::NumberTraits::min_value_ = NAN

Definition at line 32 of file number_traits.h.

◆ mode_

NumberMode esphome::number::NumberTraits::mode_ {NUMBER_MODE_AUTO}

Definition at line 35 of file number_traits.h.

◆ step_

float esphome::number::NumberTraits::step_ = NAN

Definition at line 34 of file number_traits.h.

The documentation for this class was generated from the following file: