ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::valve Namespace Reference

Data Structures

class  Valve
 Base class for all valve devices. More...
 
class  ValveCall
 
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

 ESPHOME_LOG_TAG (TAG, "valve")
 
const LogString * valve_command_to_str (float pos)
 
 PROGMEM_STRING_TABLE (ValveOperationStrings, "IDLE", "OPENING", "CLOSING", "UNKNOWN")
 
const LogString * 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 72 of file valve.h.

Function Documentation

◆ __attribute__()

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

◆ ESPHOME_LOG_TAG()

esphome::valve::ESPHOME_LOG_TAG ( TAG ,
"valve"  )

◆ PROGMEM_STRING_TABLE()

esphome::valve::PROGMEM_STRING_TABLE ( ValveOperationStrings ,
"IDLE" ,
"OPENING" ,
"CLOSING" ,
"UNKNOWN"  )

◆ valve_command_to_str()

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

Definition at line 16 of file valve.cpp.

◆ valve_operation_to_str()

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

Definition at line 28 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 14 of file valve.cpp.

◆ VALVE_OPEN

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

Definition at line 13 of file valve.cpp.