ESPHome  2024.11.0
Data Structures | Enumerations | Functions | Variables
esphome::valve Namespace Reference

Data Structures

class  CloseAction
 
class  ControlAction
 
class  OpenAction
 
class  StopAction
 
class  ToggleAction
 
class  Valve
 Base class for all valve devices. More...
 
class  ValveCall
 
class  ValveClosedTrigger
 
class  ValveIsClosedCondition
 
class  ValveIsOpenCondition
 
class  ValveOpenTrigger
 
class  ValvePublishAction
 
struct  ValveRestoreState
 Struct used to store the restored state of a valve. More...
 
class  ValveTraits
 

Enumerations

enum  ValveOperation : uint8_t { VALVE_OPERATION_IDLE = 0, VALVE_OPERATION_OPENING, VALVE_OPERATION_CLOSING }
 Enum encoding the current operation of a valve. More...
 

Functions

const char * valve_command_to_str (float pos)
 
const char * valve_operation_to_str (ValveOperation op)
 
struct esphome::valve::ValveRestoreState __attribute__ ((packed))
 

Variables

const float VALVE_OPEN = 1.0f
 
const float VALVE_CLOSED = 0.0f
 
enum esphome::valve::ValveOperation __attribute__
 

Enumeration Type Documentation

◆ ValveOperation

Enum encoding the current operation of a valve.

Enumerator
VALVE_OPERATION_IDLE 

The valve is currently idle (not moving)

VALVE_OPERATION_OPENING 

The valve is currently opening.

VALVE_OPERATION_CLOSING 

The valve is currently closing.

Definition at line 75 of file valve.h.

Function Documentation

◆ __attribute__()

struct esphome::valve::ValveRestoreState esphome::valve::__attribute__ ( (packed)  )

◆ valve_command_to_str()

const char* esphome::valve::valve_command_to_str ( float  pos)

Definition at line 12 of file valve.cpp.

◆ valve_operation_to_str()

const char * esphome::valve::valve_operation_to_str ( ValveOperation  op)

Definition at line 21 of file valve.cpp.

Variable Documentation

◆ __attribute__

enum esphome::valve::ValveOperation esphome::valve::__attribute__

◆ VALVE_CLOSED

const float esphome::valve::VALVE_CLOSED = 0.0f

Definition at line 10 of file valve.cpp.

◆ VALVE_OPEN

const float esphome::valve::VALVE_OPEN = 1.0f

Definition at line 9 of file valve.cpp.