ESPHome  1.14.3
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::cover::CoverCall Class Reference

#include <cover.h>

Public Member Functions

 CoverCall (Cover *parent)
 
CoverCallset_command (const char *command)
 Set the command as a string, "STOP", "OPEN", "CLOSE". More...
 
CoverCallset_command_open ()
 Set the command to open the cover. More...
 
CoverCallset_command_close ()
 Set the command to close the cover. More...
 
CoverCallset_command_stop ()
 Set the command to stop the cover. More...
 
CoverCallset_position (float position)
 Set the call to a certain target position. More...
 
CoverCallset_tilt (float tilt)
 Set the call to a certain target tilt. More...
 
CoverCallset_stop (bool stop)
 Set whether this cover call should stop the cover. More...
 
void perform ()
 Perform the cover call. More...
 
const optional< float > & get_position () const
 
bool get_stop () const
 
const optional< float > & get_tilt () const
 

Protected Member Functions

void validate_ ()
 

Protected Attributes

Coverparent_
 
bool stop_ {false}
 
optional< float > position_ {}
 
optional< float > tilt_ {}
 

Detailed Description

Definition at line 28 of file cover.h.

Constructor & Destructor Documentation

◆ CoverCall()

esphome::cover::CoverCall::CoverCall ( Cover parent)

Definition at line 38 of file cover.cpp.

Member Function Documentation

◆ get_position()

const optional< float > & esphome::cover::CoverCall::get_position ( ) const

Definition at line 90 of file cover.cpp.

◆ get_stop()

bool esphome::cover::CoverCall::get_stop ( ) const

Definition at line 129 of file cover.cpp.

◆ get_tilt()

const optional< float > & esphome::cover::CoverCall::get_tilt ( ) const

Definition at line 91 of file cover.cpp.

◆ perform()

void esphome::cover::CoverCall::perform ( )

Perform the cover call.

Definition at line 71 of file cover.cpp.

◆ set_command()

CoverCall & esphome::cover::CoverCall::set_command ( const char *  command)

Set the command as a string, "STOP", "OPEN", "CLOSE".

Definition at line 39 of file cover.cpp.

◆ set_command_close()

CoverCall & esphome::cover::CoverCall::set_command_close ( )

Set the command to close the cover.

Definition at line 55 of file cover.cpp.

◆ set_command_open()

CoverCall & esphome::cover::CoverCall::set_command_open ( )

Set the command to open the cover.

Definition at line 51 of file cover.cpp.

◆ set_command_stop()

CoverCall & esphome::cover::CoverCall::set_command_stop ( )

Set the command to stop the cover.

Definition at line 59 of file cover.cpp.

◆ set_position()

CoverCall & esphome::cover::CoverCall::set_position ( float  position)

Set the call to a certain target position.

Definition at line 63 of file cover.cpp.

◆ set_stop()

CoverCall & esphome::cover::CoverCall::set_stop ( bool  stop)

Set whether this cover call should stop the cover.

Definition at line 125 of file cover.cpp.

◆ set_tilt()

CoverCall & esphome::cover::CoverCall::set_tilt ( float  tilt)

Set the call to a certain target tilt.

Definition at line 67 of file cover.cpp.

◆ validate_()

void esphome::cover::CoverCall::validate_ ( )
protected

Definition at line 92 of file cover.cpp.

Field Documentation

◆ parent_

Cover* esphome::cover::CoverCall::parent_
protected

Definition at line 57 of file cover.h.

◆ position_

optional<float> esphome::cover::CoverCall::position_ {}
protected

Definition at line 59 of file cover.h.

◆ stop_

bool esphome::cover::CoverCall::stop_ {false}
protected

Definition at line 58 of file cover.h.

◆ tilt_

optional<float> esphome::cover::CoverCall::tilt_ {}
protected

Definition at line 60 of file cover.h.


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