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

Cover entity representing an IO‑Homecontrol shutter/awning/blind. More...

#include <platform_cover.h>

Inheritance diagram for esphome::home_io_control::IOHomeCover:
Collaboration diagram for esphome::home_io_control::IOHomeCover:

Public Member Functions

 IOHomeCover ()
void setup () override
 Initialize the cover entity (register device, subscribe to updates, schedule initial status poll).
void dump_config () override
 Dump configuration to log.
float get_setup_priority () const override
 Get setup priority (DATA so we have device registry available).
cover::CoverTraits get_traits () override
 Return the traits object describing this cover's capabilities.
void set_parent (IOHomeControlComponent *parent)
 Set the parent controller component.
void set_device_id (const std::string &id)
 Set the unique 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_invert_position (bool invert)
 Enable or disable position inversion.
void set_status_poll_interval (uint32_t poll_interval_ms)
 Configure bounded follow-up polling while a state change is expected.
bool supports_tilt () const
 Query whether this device supports tilt (slat angle) control.

Protected Member Functions

void control (const cover::CoverCall &call) override
 Handle cover commands from Home Assistant (open/close/stop/set_position).
void on_device_update_ (const std::string &id, const IoDevice &dev)
 Callback invoked when the underlying device state changes.
bool effective_invert_ () const
 Resolve the current inversion mode.

Protected Attributes

IOHomeControlComponentparent_ {nullptr}
std::string device_id_
DeviceType device_type_ {DeviceType::UNKNOWN}
uint8_t subtype_ {0}
uint32_t status_poll_interval_ms_ {0}
bool invert_ {false}
bool invert_explicit_ {false}

Detailed Description

Cover entity representing an IO‑Homecontrol shutter/awning/blind.

Definition at line 27 of file platform_cover.h.

Constructor & Destructor Documentation

◆ IOHomeCover()

esphome::home_io_control::IOHomeCover::IOHomeCover ( )
inline

Definition at line 29 of file platform_cover.h.

Member Function Documentation

◆ control()

void esphome::home_io_control::IOHomeCover::control ( const cover::CoverCall & call)
overrideprotected

Handle cover commands from Home Assistant (open/close/stop/set_position).

Parameters
callCoverCall containing the requested operation.

Definition at line 53 of file platform_cover.cpp.

Here is the call graph for this function:

◆ dump_config()

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

Dump configuration to log.

Definition at line 126 of file platform_cover.cpp.

Here is the call graph for this function:

◆ effective_invert_()

bool esphome::home_io_control::IOHomeCover::effective_invert_ ( ) const
nodiscardprotected

Resolve the current inversion mode.

Returns
Explicit YAML override when set, otherwise the runtime device profile.

Definition at line 44 of file platform_cover.cpp.

◆ get_setup_priority()

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

Get setup priority (DATA so we have device registry available).

Returns
setup_priority::DATA.

Definition at line 36 of file platform_cover.h.

◆ get_traits()

cover::CoverTraits esphome::home_io_control::IOHomeCover::get_traits ( )
override

Return the traits object describing this cover's capabilities.

Returns
CoverTraits configured for position, stop, and optional tilt.

Definition at line 28 of file platform_cover.cpp.

Here is the call graph for this function:

◆ on_device_update_()

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

Callback invoked when the underlying device state changes.

Parameters
idDevice ID that updated.
devUpdated IoDevice state.

Definition at line 86 of file platform_cover.cpp.

Here is the call graph for this function:

◆ set_device_id()

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

Set the unique device ID (from YAML).

Parameters
idHexadecimal node ID string (e.g., "123ABC").

Definition at line 47 of file platform_cover.h.

◆ set_device_type()

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

Set the declared device type (from YAML).

Parameters
typeDevice type enum.

Definition at line 50 of file platform_cover.h.

◆ set_invert_position()

void esphome::home_io_control::IOHomeCover::set_invert_position ( bool invert)
inline

Enable or disable position inversion.

Some devices (e.g., horizontal awnings) report reversed open/close semantics.

Parameters
invertTrue to invert the mapping (HA 1.0 → IO 0, HA 0.0 → IO 100).

Definition at line 57 of file platform_cover.h.

◆ set_parent()

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

Set the parent controller component.

Parameters
parentPointer to the IOHomeControlComponent instance.

Definition at line 44 of file platform_cover.h.

◆ set_status_poll_interval()

void esphome::home_io_control::IOHomeCover::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 63 of file platform_cover.h.

◆ set_subtype()

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

Set the declared device subtype (from YAML).

Parameters
subtypeSubtype value.

Definition at line 53 of file platform_cover.h.

◆ setup()

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

Initialize the cover entity (register device, subscribe to updates, schedule initial status poll).

Definition at line 13 of file platform_cover.cpp.

Here is the call graph for this function:

◆ supports_tilt()

bool esphome::home_io_control::IOHomeCover::supports_tilt ( ) const
nodiscard

Query whether this device supports tilt (slat angle) control.

Returns
true if the underlying device type supports tilt.

Definition at line 37 of file platform_cover.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ device_id_

std::string esphome::home_io_control::IOHomeCover::device_id_
protected

Definition at line 81 of file platform_cover.h.

◆ device_type_

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

Definition at line 82 of file platform_cover.h.

◆ invert_

bool esphome::home_io_control::IOHomeCover::invert_ {false}
protected

Definition at line 85 of file platform_cover.h.

◆ invert_explicit_

bool esphome::home_io_control::IOHomeCover::invert_explicit_ {false}
protected

Definition at line 86 of file platform_cover.h.

◆ parent_

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

Definition at line 80 of file platform_cover.h.

◆ status_poll_interval_ms_

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

Definition at line 84 of file platform_cover.h.

◆ subtype_

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

Definition at line 83 of file platform_cover.h.


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