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

Binary light entity for IO‑Homecontrol on/off devices. More...

#include <platform_light.h>

Inheritance diagram for esphome::home_io_control::IOHomeLight:
Collaboration diagram for esphome::home_io_control::IOHomeLight:

Public Member Functions

void setup () override
 Initialize the light entity.
void dump_config () override
 Dump configuration to log.
float get_setup_priority () const override
 Get setup priority (DATA).
light::LightTraits get_traits () override
 Return traits: binary on/off only (no dimming).
void setup_state (light::LightState *state) override
 Store the HA LightState object for state updates.
void write_state (light::LightState *state) override
void set_parent (IOHomeControlComponent *parent)
 Set parent controller.
void set_device_id (const std::string &id)
 Set device ID from YAML.
void set_device_type (DeviceType type)
 Set the declared device type (from YAML).
void set_subtype (uint8_t subtype)
 Set the declared device subtype (from YAML).
void set_status_poll_interval (uint32_t poll_interval_ms)
 Configure bounded follow-up polling while a state change is expected.

Protected Member Functions

void on_device_update_ (const std::string &id, const IoDevice &dev)
 Handle inbound device status updates.

Protected Attributes

IOHomeControlComponentparent_ {nullptr}
light::LightState * state_ {nullptr}
std::string device_id_
DeviceType device_type_ {DeviceType::UNKNOWN}
uint8_t subtype_ {0}
uint32_t status_poll_interval_ms_ {0}
bool suppress_write_ {false}
 Guard so that an inbound radio status does not echo back as a new outbound command.

Detailed Description

Binary light entity for IO‑Homecontrol on/off devices.

Definition at line 21 of file platform_light.h.

Member Function Documentation

◆ dump_config()

void esphome::home_io_control::IOHomeLight::dump_config ( )
override

Dump configuration to log.

Definition at line 70 of file platform_light.cpp.

◆ get_setup_priority()

float esphome::home_io_control::IOHomeLight::get_setup_priority ( ) const
inlinenodiscardoverride

Get setup priority (DATA).

Returns
setup_priority::DATA.

Definition at line 29 of file platform_light.h.

◆ get_traits()

light::LightTraits esphome::home_io_control::IOHomeLight::get_traits ( )
override

Return traits: binary on/off only (no dimming).

Returns
LightTraits with ColorMode::ON_OFF.

Definition at line 28 of file platform_light.cpp.

◆ on_device_update_()

void esphome::home_io_control::IOHomeLight::on_device_update_ ( const std::string & id,
const IoDevice & dev )
protected

Handle inbound device status updates.

Parameters
idDevice ID.
devUpdated device state.

Definition at line 47 of file platform_light.cpp.

◆ set_device_id()

void esphome::home_io_control::IOHomeLight::set_device_id ( const std::string & id)
inline

Set device ID from YAML.

Parameters
idHex string node ID.

Definition at line 44 of file platform_light.h.

◆ set_device_type()

void esphome::home_io_control::IOHomeLight::set_device_type ( DeviceType type)
inline

Set the declared device type (from YAML).

Parameters
typeDevice type enum.

Definition at line 47 of file platform_light.h.

◆ set_parent()

void esphome::home_io_control::IOHomeLight::set_parent ( IOHomeControlComponent * parent)
inline

Set parent controller.

Parameters
parentPointer to IOHomeControlComponent.

Definition at line 41 of file platform_light.h.

◆ set_status_poll_interval()

void esphome::home_io_control::IOHomeLight::set_status_poll_interval ( uint32_t poll_interval_ms)
inline

Configure bounded follow-up polling while a state change is expected.

Parameters
poll_interval_msPoll interval in milliseconds; zero keeps the default single settle poll only.

Definition at line 53 of file platform_light.h.

◆ set_subtype()

void esphome::home_io_control::IOHomeLight::set_subtype ( uint8_t subtype)
inline

Set the declared device subtype (from YAML).

Parameters
subtypeSubtype value.

Definition at line 50 of file platform_light.h.

◆ setup()

void esphome::home_io_control::IOHomeLight::setup ( )
override

Initialize the light entity.

Definition at line 13 of file platform_light.cpp.

Here is the call graph for this function:

◆ setup_state()

void esphome::home_io_control::IOHomeLight::setup_state ( light::LightState * state)
inlineoverride

Store the HA LightState object for state updates.

Parameters
statePointer to LightState.

Definition at line 36 of file platform_light.h.

◆ write_state()

void esphome::home_io_control::IOHomeLight::write_state ( light::LightState * state)
override

Definition at line 35 of file platform_light.cpp.

Member Data Documentation

◆ device_id_

std::string esphome::home_io_control::IOHomeLight::device_id_
protected

Definition at line 63 of file platform_light.h.

◆ device_type_

DeviceType esphome::home_io_control::IOHomeLight::device_type_ {DeviceType::UNKNOWN}
protected

Definition at line 64 of file platform_light.h.

◆ parent_

IOHomeControlComponent* esphome::home_io_control::IOHomeLight::parent_ {nullptr}
protected

Definition at line 61 of file platform_light.h.

◆ state_

light::LightState* esphome::home_io_control::IOHomeLight::state_ {nullptr}
protected

Definition at line 62 of file platform_light.h.

◆ status_poll_interval_ms_

uint32_t esphome::home_io_control::IOHomeLight::status_poll_interval_ms_ {0}
protected

Definition at line 66 of file platform_light.h.

◆ subtype_

uint8_t esphome::home_io_control::IOHomeLight::subtype_ {0}
protected

Definition at line 65 of file platform_light.h.

◆ suppress_write_

bool esphome::home_io_control::IOHomeLight::suppress_write_ {false}
protected

Guard so that an inbound radio status does not echo back as a new outbound command.

Definition at line 68 of file platform_light.h.


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