ESPHome  2024.10.2
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", "TOGGLE". 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_command_toggle ()
 Set the command to toggle 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
 
const optional< bool > & get_toggle () const
 

Protected Member Functions

void validate_ ()
 

Protected Attributes

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

Detailed Description

Definition at line 29 of file cover.h.

Constructor & Destructor Documentation

◆ CoverCall()

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

Definition at line 36 of file cover.cpp.

Member Function Documentation

◆ get_position()

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

Definition at line 97 of file cover.cpp.

◆ get_stop()

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

Definition at line 147 of file cover.cpp.

◆ get_tilt()

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

Definition at line 98 of file cover.cpp.

◆ get_toggle()

const optional< bool > & esphome::cover::CoverCall::get_toggle ( ) const

Definition at line 99 of file cover.cpp.

◆ perform()

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

Perform the cover call.

Definition at line 75 of file cover.cpp.

◆ set_command()

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

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

Definition at line 37 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_command_toggle()

CoverCall & esphome::cover::CoverCall::set_command_toggle ( )

Set the command to toggle the cover.

Definition at line 63 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 67 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 143 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 71 of file cover.cpp.

◆ validate_()

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

Definition at line 100 of file cover.cpp.

Field Documentation

◆ parent_

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

Definition at line 61 of file cover.h.

◆ position_

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

Definition at line 63 of file cover.h.

◆ stop_

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

Definition at line 62 of file cover.h.

◆ tilt_

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

Definition at line 64 of file cover.h.

◆ toggle_

optional<bool> esphome::cover::CoverCall::toggle_ {}
protected

Definition at line 65 of file cover.h.


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