ESPHome  2024.11.0
Public Member Functions | Protected Attributes
esphome::lock::LockTraits Class Reference

#include <lock.h>

Public Member Functions

 LockTraits ()=default
 
bool get_supports_open () const
 
void set_supports_open (bool supports_open)
 
bool get_requires_code () const
 
void set_requires_code (bool requires_code)
 
bool get_assumed_state () const
 
void set_assumed_state (bool assumed_state)
 
bool supports_state (LockState state) const
 
std::set< LockStateget_supported_states () const
 
void set_supported_states (std::set< LockState > states)
 
void add_supported_state (LockState state)
 

Protected Attributes

bool supports_open_ {false}
 
bool requires_code_ {false}
 
bool assumed_state_ {false}
 
std::set< LockStatesupported_states_ = {LOCK_STATE_NONE, LOCK_STATE_LOCKED, LOCK_STATE_UNLOCKED}
 

Detailed Description

Definition at line 36 of file lock.h.

Constructor & Destructor Documentation

◆ LockTraits()

esphome::lock::LockTraits::LockTraits ( )
default

Member Function Documentation

◆ add_supported_state()

void esphome::lock::LockTraits::add_supported_state ( LockState  state)
inline

Definition at line 50 of file lock.h.

◆ get_assumed_state()

bool esphome::lock::LockTraits::get_assumed_state ( ) const
inline

Definition at line 44 of file lock.h.

◆ get_requires_code()

bool esphome::lock::LockTraits::get_requires_code ( ) const
inline

Definition at line 42 of file lock.h.

◆ get_supported_states()

std::set<LockState> esphome::lock::LockTraits::get_supported_states ( ) const
inline

Definition at line 48 of file lock.h.

◆ get_supports_open()

bool esphome::lock::LockTraits::get_supports_open ( ) const
inline

Definition at line 40 of file lock.h.

◆ set_assumed_state()

void esphome::lock::LockTraits::set_assumed_state ( bool  assumed_state)
inline

Definition at line 45 of file lock.h.

◆ set_requires_code()

void esphome::lock::LockTraits::set_requires_code ( bool  requires_code)
inline

Definition at line 43 of file lock.h.

◆ set_supported_states()

void esphome::lock::LockTraits::set_supported_states ( std::set< LockState states)
inline

Definition at line 49 of file lock.h.

◆ set_supports_open()

void esphome::lock::LockTraits::set_supports_open ( bool  supports_open)
inline

Definition at line 41 of file lock.h.

◆ supports_state()

bool esphome::lock::LockTraits::supports_state ( LockState  state) const
inline

Definition at line 47 of file lock.h.

Field Documentation

◆ assumed_state_

bool esphome::lock::LockTraits::assumed_state_ {false}
protected

Definition at line 55 of file lock.h.

◆ requires_code_

bool esphome::lock::LockTraits::requires_code_ {false}
protected

Definition at line 54 of file lock.h.

◆ supported_states_

std::set<LockState> esphome::lock::LockTraits::supported_states_ = {LOCK_STATE_NONE, LOCK_STATE_LOCKED, LOCK_STATE_UNLOCKED}
protected

Definition at line 56 of file lock.h.

◆ supports_open_

bool esphome::lock::LockTraits::supports_open_ {false}
protected

Definition at line 53 of file lock.h.


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