Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
esphome::home_io_control::OneWayControllerRegistry Class Reference

The configured 1W controller identities, in YAML declaration order. More...

#include <oneway_controller.h>

Collaboration diagram for esphome::home_io_control::OneWayControllerRegistry:

Public Member Functions

void add (const OneWayControllerIdentity &identity)
 Add a configured identity.
const OneWayControllerIdentityget (const std::string &id) const
 Look up an identity by its YAML handle.
const std::vector< OneWayControllerIdentity > & all () const
 All configured identities, in declaration order.
bool empty () const
 Whether any identity is configured.

Detailed Description

The configured 1W controller identities, in YAML declaration order.

Lookup is by id and linear: a hub has a handful of identities, not hundreds, and keeping insertion order makes boot logging read the same as the YAML that produced it.

Definition at line 226 of file oneway_controller.h.

Member Function Documentation

◆ add()

void esphome::home_io_control::OneWayControllerRegistry::add ( const OneWayControllerIdentity & identity)
inline

Add a configured identity.

Called from generated code at setup.

Parameters
identityFully-resolved identity (key inherited or explicit, address configured or derived).

Definition at line 230 of file oneway_controller.h.

◆ all()

const std::vector< OneWayControllerIdentity > & esphome::home_io_control::OneWayControllerRegistry::all ( ) const
inlinenodiscard

All configured identities, in declaration order.

Definition at line 244 of file oneway_controller.h.

◆ empty()

bool esphome::home_io_control::OneWayControllerRegistry::empty ( ) const
inlinenodiscard

Whether any identity is configured.

Definition at line 247 of file oneway_controller.h.

◆ get()

const OneWayControllerIdentity * esphome::home_io_control::OneWayControllerRegistry::get ( const std::string & id) const
inlinenodiscard

Look up an identity by its YAML handle.

Parameters
idHandle to find.
Returns
Pointer to the identity, or nullptr if no such handle is configured.

Definition at line 235 of file oneway_controller.h.


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