esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
esphome::api::BinarySensorEntity Class Reference

Handle to a BinarySensor entity. More...

#include <entity_handles.hpp>

Inheritance diagram for esphome::api::BinarySensorEntity:
Inheritance graph
[legend]
Collaboration diagram for esphome::api::BinarySensorEntity:
Collaboration graph
[legend]

Public Member Functions

std::optional< BinarySensorInfoinfo () const
 
std::optional< BinarySensorStatestate () const
 
std::string device_class () const
 
bool is_status_binary_sensor () const
 
bool missing_state () const
 
bool is_on () const
 Whether the sensor currently reads active.
 
- Public Member Functions inherited from esphome::api::TypedEntity< BinarySensorEntity >
std::string icon () const
 
bool disabled_by_default () const
 
EntityCategory entity_category () const
 
std::uint32_t device_id () const
 
 Entity (Client &client, const std::uint32_t key, std::string object_id, std::string name)
 
- Public Member Functions inherited from esphome::api::Entity
 Entity (Client &client, const std::uint32_t key, std::string object_id, std::string name)
 
std::uint32_t key () const noexcept
 
const std::string & object_id () const noexcept
 
const std::string & name () const noexcept
 

Static Public Member Functions

static constexpr EntityType type ()
 

Additional Inherited Members

- Protected Attributes inherited from esphome::api::Entity
Clientclient_
 
std::uint32_t key_
 
std::string object_id_
 
std::string name_
 

Detailed Description

Handle to a BinarySensor entity.

Member Function Documentation

◆ device_class()

std::string esphome::api::BinarySensorEntity::device_class ( ) const
inline

◆ info()

std::optional< BinarySensorInfo > esphome::api::BinarySensorEntity::info ( ) const
inline

◆ is_on()

bool esphome::api::BinarySensorEntity::is_on ( ) const
inline

Whether the sensor currently reads active.

◆ is_status_binary_sensor()

bool esphome::api::BinarySensorEntity::is_status_binary_sensor ( ) const
inline

◆ missing_state()

bool esphome::api::BinarySensorEntity::missing_state ( ) const
inline

◆ state()

std::optional< BinarySensorState > esphome::api::BinarySensorEntity::state ( ) const
inline

◆ type()

static constexpr EntityType esphome::api::BinarySensorEntity::type ( )
inlinestaticconstexpr

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