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

Object-oriented façade over the entity store. More...

#include <entity_registry.hpp>

Public Member Functions

 EntityRegistry (Client &client)
 
std::size_t size () const
 Total number of discovered entities (all domains).
 
EntityList< BinarySensorEntity > binary_sensors () const
 
std::optional< BinarySensorEntity > binary_sensor (const std::uint32_t key) const
 
std::optional< BinarySensorEntity > binary_sensor (const std::string_view object_id) const
 
EntityList< SensorEntity > sensors () const
 
std::optional< SensorEntity > sensor (const std::uint32_t key) const
 
std::optional< SensorEntity > sensor (const std::string_view object_id) const
 
EntityList< TextSensorEntity > text_sensors () const
 
std::optional< TextSensorEntity > text_sensor (const std::uint32_t key) const
 
std::optional< TextSensorEntity > text_sensor (const std::string_view object_id) const
 
EntityList< SwitchEntity > switches () const
 
std::optional< SwitchEntity > switch_ (const std::uint32_t key) const
 
std::optional< SwitchEntity > switch_ (const std::string_view object_id) const
 
EntityList< LightEntity > lights () const
 
std::optional< LightEntity > light (const std::uint32_t key) const
 
std::optional< LightEntity > light (const std::string_view object_id) const
 
EntityList< CoverEntity > covers () const
 
std::optional< CoverEntity > cover (const std::uint32_t key) const
 
std::optional< CoverEntity > cover (const std::string_view object_id) const
 
EntityList< FanEntity > fans () const
 
std::optional< FanEntity > fan (const std::uint32_t key) const
 
std::optional< FanEntity > fan (const std::string_view object_id) const
 
EntityList< ClimateEntity > climates () const
 
std::optional< ClimateEntity > climate (const std::uint32_t key) const
 
std::optional< ClimateEntity > climate (const std::string_view object_id) const
 
EntityList< NumberEntity > numbers () const
 
std::optional< NumberEntity > number (const std::uint32_t key) const
 
std::optional< NumberEntity > number (const std::string_view object_id) const
 
EntityList< SelectEntity > selects () const
 
std::optional< SelectEntity > select (const std::uint32_t key) const
 
std::optional< SelectEntity > select (const std::string_view object_id) const
 
EntityList< TextEntity > texts () const
 
std::optional< TextEntity > text (const std::uint32_t key) const
 
std::optional< TextEntity > text (const std::string_view object_id) const
 
EntityList< ButtonEntity > buttons () const
 
std::optional< ButtonEntity > button (const std::uint32_t key) const
 
std::optional< ButtonEntity > button (const std::string_view object_id) const
 
EntityList< LockEntity > locks () const
 
std::optional< LockEntity > lock (const std::uint32_t key) const
 
std::optional< LockEntity > lock (const std::string_view object_id) const
 
EntityList< MediaPlayerEntity > media_players () const
 
std::optional< MediaPlayerEntity > media_player (const std::uint32_t key) const
 
std::optional< MediaPlayerEntity > media_player (const std::string_view object_id) const
 
EntityList< CameraEntity > cameras () const
 
std::optional< CameraEntity > camera (const std::uint32_t key) const
 
std::optional< CameraEntity > camera (const std::string_view object_id) const
 
EntityList< SirenEntity > sirens () const
 
std::optional< SirenEntity > siren (const std::uint32_t key) const
 
std::optional< SirenEntity > siren (const std::string_view object_id) const
 
EntityList< AlarmControlPanelEntity > alarm_control_panels () const
 
std::optional< AlarmControlPanelEntity > alarm_control_panel (const std::uint32_t key) const
 
std::optional< AlarmControlPanelEntity > alarm_control_panel (const std::string_view object_id) const
 
EntityList< DateEntity > dates () const
 
std::optional< DateEntity > date (const std::uint32_t key) const
 
std::optional< DateEntity > date (const std::string_view object_id) const
 
EntityList< TimeEntity > times () const
 
std::optional< TimeEntity > time (const std::uint32_t key) const
 
std::optional< TimeEntity > time (const std::string_view object_id) const
 
EntityList< DateTimeEntity > datetimes () const
 
std::optional< DateTimeEntity > datetime (const std::uint32_t key) const
 
std::optional< DateTimeEntity > datetime (const std::string_view object_id) const
 
EntityList< ValveEntity > valves () const
 
std::optional< ValveEntity > valve (const std::uint32_t key) const
 
std::optional< ValveEntity > valve (const std::string_view object_id) const
 
EntityList< EventEntity > events () const
 
std::optional< EventEntity > event (const std::uint32_t key) const
 
std::optional< EventEntity > event (const std::string_view object_id) const
 
EntityList< UpdateEntity > updates () const
 
std::optional< UpdateEntity > update (const std::uint32_t key) const
 
std::optional< UpdateEntity > update (const std::string_view object_id) const
 
EntityList< WaterHeaterEntity > water_heaters () const
 
std::optional< WaterHeaterEntity > water_heater (const std::uint32_t key) const
 
std::optional< WaterHeaterEntity > water_heater (const std::string_view object_id) const
 
EntityList< InfraredEntity > infrareds () const
 
std::optional< InfraredEntity > infrared (const std::uint32_t key) const
 
std::optional< InfraredEntity > infrared (const std::string_view object_id) const
 
EntityList< RadioFrequencyEntity > radio_frequencys () const
 
std::optional< RadioFrequencyEntity > radio_frequency (const std::uint32_t key) const
 
std::optional< RadioFrequencyEntity > radio_frequency (const std::string_view object_id) const
 

Detailed Description

Object-oriented façade over the entity store.

Constructor & Destructor Documentation

◆ EntityRegistry()

esphome::api::EntityRegistry::EntityRegistry ( Client &  client)
inlineexplicit

Member Function Documentation

◆ alarm_control_panel() [1/2]

std::optional< AlarmControlPanelEntity > esphome::api::EntityRegistry::alarm_control_panel ( const std::string_view  object_id) const
inline

◆ alarm_control_panel() [2/2]

std::optional< AlarmControlPanelEntity > esphome::api::EntityRegistry::alarm_control_panel ( const std::uint32_t  key) const
inline

◆ alarm_control_panels()

EntityList< AlarmControlPanelEntity > esphome::api::EntityRegistry::alarm_control_panels ( ) const
inline

◆ binary_sensor() [1/2]

std::optional< BinarySensorEntity > esphome::api::EntityRegistry::binary_sensor ( const std::string_view  object_id) const
inline

◆ binary_sensor() [2/2]

std::optional< BinarySensorEntity > esphome::api::EntityRegistry::binary_sensor ( const std::uint32_t  key) const
inline

◆ binary_sensors()

EntityList< BinarySensorEntity > esphome::api::EntityRegistry::binary_sensors ( ) const
inline

◆ button() [1/2]

std::optional< ButtonEntity > esphome::api::EntityRegistry::button ( const std::string_view  object_id) const
inline

◆ button() [2/2]

std::optional< ButtonEntity > esphome::api::EntityRegistry::button ( const std::uint32_t  key) const
inline

◆ buttons()

EntityList< ButtonEntity > esphome::api::EntityRegistry::buttons ( ) const
inline

◆ camera() [1/2]

std::optional< CameraEntity > esphome::api::EntityRegistry::camera ( const std::string_view  object_id) const
inline

◆ camera() [2/2]

std::optional< CameraEntity > esphome::api::EntityRegistry::camera ( const std::uint32_t  key) const
inline

◆ cameras()

EntityList< CameraEntity > esphome::api::EntityRegistry::cameras ( ) const
inline

◆ climate() [1/2]

std::optional< ClimateEntity > esphome::api::EntityRegistry::climate ( const std::string_view  object_id) const
inline

◆ climate() [2/2]

std::optional< ClimateEntity > esphome::api::EntityRegistry::climate ( const std::uint32_t  key) const
inline

◆ climates()

EntityList< ClimateEntity > esphome::api::EntityRegistry::climates ( ) const
inline

◆ cover() [1/2]

std::optional< CoverEntity > esphome::api::EntityRegistry::cover ( const std::string_view  object_id) const
inline

◆ cover() [2/2]

std::optional< CoverEntity > esphome::api::EntityRegistry::cover ( const std::uint32_t  key) const
inline

◆ covers()

EntityList< CoverEntity > esphome::api::EntityRegistry::covers ( ) const
inline

◆ date() [1/2]

std::optional< DateEntity > esphome::api::EntityRegistry::date ( const std::string_view  object_id) const
inline

◆ date() [2/2]

std::optional< DateEntity > esphome::api::EntityRegistry::date ( const std::uint32_t  key) const
inline

◆ dates()

EntityList< DateEntity > esphome::api::EntityRegistry::dates ( ) const
inline

◆ datetime() [1/2]

std::optional< DateTimeEntity > esphome::api::EntityRegistry::datetime ( const std::string_view  object_id) const
inline

◆ datetime() [2/2]

std::optional< DateTimeEntity > esphome::api::EntityRegistry::datetime ( const std::uint32_t  key) const
inline

◆ datetimes()

EntityList< DateTimeEntity > esphome::api::EntityRegistry::datetimes ( ) const
inline

◆ event() [1/2]

std::optional< EventEntity > esphome::api::EntityRegistry::event ( const std::string_view  object_id) const
inline

◆ event() [2/2]

std::optional< EventEntity > esphome::api::EntityRegistry::event ( const std::uint32_t  key) const
inline

◆ events()

EntityList< EventEntity > esphome::api::EntityRegistry::events ( ) const
inline

◆ fan() [1/2]

std::optional< FanEntity > esphome::api::EntityRegistry::fan ( const std::string_view  object_id) const
inline

◆ fan() [2/2]

std::optional< FanEntity > esphome::api::EntityRegistry::fan ( const std::uint32_t  key) const
inline

◆ fans()

EntityList< FanEntity > esphome::api::EntityRegistry::fans ( ) const
inline

◆ infrared() [1/2]

std::optional< InfraredEntity > esphome::api::EntityRegistry::infrared ( const std::string_view  object_id) const
inline

◆ infrared() [2/2]

std::optional< InfraredEntity > esphome::api::EntityRegistry::infrared ( const std::uint32_t  key) const
inline

◆ infrareds()

EntityList< InfraredEntity > esphome::api::EntityRegistry::infrareds ( ) const
inline

◆ light() [1/2]

std::optional< LightEntity > esphome::api::EntityRegistry::light ( const std::string_view  object_id) const
inline

◆ light() [2/2]

std::optional< LightEntity > esphome::api::EntityRegistry::light ( const std::uint32_t  key) const
inline

◆ lights()

EntityList< LightEntity > esphome::api::EntityRegistry::lights ( ) const
inline

◆ lock() [1/2]

std::optional< LockEntity > esphome::api::EntityRegistry::lock ( const std::string_view  object_id) const
inline

◆ lock() [2/2]

std::optional< LockEntity > esphome::api::EntityRegistry::lock ( const std::uint32_t  key) const
inline

◆ locks()

EntityList< LockEntity > esphome::api::EntityRegistry::locks ( ) const
inline

◆ media_player() [1/2]

std::optional< MediaPlayerEntity > esphome::api::EntityRegistry::media_player ( const std::string_view  object_id) const
inline

◆ media_player() [2/2]

std::optional< MediaPlayerEntity > esphome::api::EntityRegistry::media_player ( const std::uint32_t  key) const
inline

◆ media_players()

EntityList< MediaPlayerEntity > esphome::api::EntityRegistry::media_players ( ) const
inline

◆ number() [1/2]

std::optional< NumberEntity > esphome::api::EntityRegistry::number ( const std::string_view  object_id) const
inline

◆ number() [2/2]

std::optional< NumberEntity > esphome::api::EntityRegistry::number ( const std::uint32_t  key) const
inline

◆ numbers()

EntityList< NumberEntity > esphome::api::EntityRegistry::numbers ( ) const
inline

◆ radio_frequency() [1/2]

std::optional< RadioFrequencyEntity > esphome::api::EntityRegistry::radio_frequency ( const std::string_view  object_id) const
inline

◆ radio_frequency() [2/2]

std::optional< RadioFrequencyEntity > esphome::api::EntityRegistry::radio_frequency ( const std::uint32_t  key) const
inline

◆ radio_frequencys()

EntityList< RadioFrequencyEntity > esphome::api::EntityRegistry::radio_frequencys ( ) const
inline

◆ select() [1/2]

std::optional< SelectEntity > esphome::api::EntityRegistry::select ( const std::string_view  object_id) const
inline

◆ select() [2/2]

std::optional< SelectEntity > esphome::api::EntityRegistry::select ( const std::uint32_t  key) const
inline

◆ selects()

EntityList< SelectEntity > esphome::api::EntityRegistry::selects ( ) const
inline

◆ sensor() [1/2]

std::optional< SensorEntity > esphome::api::EntityRegistry::sensor ( const std::string_view  object_id) const
inline

◆ sensor() [2/2]

std::optional< SensorEntity > esphome::api::EntityRegistry::sensor ( const std::uint32_t  key) const
inline

◆ sensors()

EntityList< SensorEntity > esphome::api::EntityRegistry::sensors ( ) const
inline

◆ siren() [1/2]

std::optional< SirenEntity > esphome::api::EntityRegistry::siren ( const std::string_view  object_id) const
inline

◆ siren() [2/2]

std::optional< SirenEntity > esphome::api::EntityRegistry::siren ( const std::uint32_t  key) const
inline

◆ sirens()

EntityList< SirenEntity > esphome::api::EntityRegistry::sirens ( ) const
inline

◆ size()

std::size_t esphome::api::EntityRegistry::size ( ) const
inline

Total number of discovered entities (all domains).

◆ switch_() [1/2]

std::optional< SwitchEntity > esphome::api::EntityRegistry::switch_ ( const std::string_view  object_id) const
inline

◆ switch_() [2/2]

std::optional< SwitchEntity > esphome::api::EntityRegistry::switch_ ( const std::uint32_t  key) const
inline

◆ switches()

EntityList< SwitchEntity > esphome::api::EntityRegistry::switches ( ) const
inline

◆ text() [1/2]

std::optional< TextEntity > esphome::api::EntityRegistry::text ( const std::string_view  object_id) const
inline

◆ text() [2/2]

std::optional< TextEntity > esphome::api::EntityRegistry::text ( const std::uint32_t  key) const
inline

◆ text_sensor() [1/2]

std::optional< TextSensorEntity > esphome::api::EntityRegistry::text_sensor ( const std::string_view  object_id) const
inline

◆ text_sensor() [2/2]

std::optional< TextSensorEntity > esphome::api::EntityRegistry::text_sensor ( const std::uint32_t  key) const
inline

◆ text_sensors()

EntityList< TextSensorEntity > esphome::api::EntityRegistry::text_sensors ( ) const
inline

◆ texts()

EntityList< TextEntity > esphome::api::EntityRegistry::texts ( ) const
inline

◆ time() [1/2]

std::optional< TimeEntity > esphome::api::EntityRegistry::time ( const std::string_view  object_id) const
inline

◆ time() [2/2]

std::optional< TimeEntity > esphome::api::EntityRegistry::time ( const std::uint32_t  key) const
inline

◆ times()

EntityList< TimeEntity > esphome::api::EntityRegistry::times ( ) const
inline

◆ update() [1/2]

std::optional< UpdateEntity > esphome::api::EntityRegistry::update ( const std::string_view  object_id) const
inline

◆ update() [2/2]

std::optional< UpdateEntity > esphome::api::EntityRegistry::update ( const std::uint32_t  key) const
inline

◆ updates()

EntityList< UpdateEntity > esphome::api::EntityRegistry::updates ( ) const
inline

◆ valve() [1/2]

std::optional< ValveEntity > esphome::api::EntityRegistry::valve ( const std::string_view  object_id) const
inline

◆ valve() [2/2]

std::optional< ValveEntity > esphome::api::EntityRegistry::valve ( const std::uint32_t  key) const
inline

◆ valves()

EntityList< ValveEntity > esphome::api::EntityRegistry::valves ( ) const
inline

◆ water_heater() [1/2]

std::optional< WaterHeaterEntity > esphome::api::EntityRegistry::water_heater ( const std::string_view  object_id) const
inline

◆ water_heater() [2/2]

std::optional< WaterHeaterEntity > esphome::api::EntityRegistry::water_heater ( const std::uint32_t  key) const
inline

◆ water_heaters()

EntityList< WaterHeaterEntity > esphome::api::EntityRegistry::water_heaters ( ) const
inline

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