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

Lock entity for IO-Homecontrol lock devices. More...

#include <platform_lock.h>

Inheritance diagram for esphome::home_io_control::IOHomeLock:
Collaboration diagram for esphome::home_io_control::IOHomeLock:

Public Member Functions

void setup () override
 Initialize the lock entity and register it with the shared hub.
void dump_config () override
 Dump configuration to the log.
float get_setup_priority () const override
 Get setup priority (DATA).
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 control (const lock::LockCall &call) override
 Apply a Home Assistant lock control request.
void on_device_update_ (const std::string &id, const IoDevice &dev)
 Handle inbound device status updates.

Protected Attributes

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

Detailed Description

Lock entity for IO-Homecontrol lock devices.

Definition at line 24 of file platform_lock.h.

Member Function Documentation

◆ control()

void esphome::home_io_control::IOHomeLock::control ( const lock::LockCall & call)
overrideprotected

Apply a Home Assistant lock control request.

Parameters
callDesired state change.

Definition at line 31 of file platform_lock.cpp.

◆ dump_config()

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

Dump configuration to the log.

Definition at line 68 of file platform_lock.cpp.

◆ get_setup_priority()

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

Get setup priority (DATA).

Returns
setup_priority::DATA.

Definition at line 32 of file platform_lock.h.

◆ on_device_update_()

void esphome::home_io_control::IOHomeLock::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 52 of file platform_lock.cpp.

◆ set_device_id()

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

Set device ID from YAML.

Parameters
idHex string node ID.

Definition at line 39 of file platform_lock.h.

◆ set_device_type()

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

Set the declared device type (from YAML).

Parameters
typeDevice type enum.

Definition at line 42 of file platform_lock.h.

◆ set_parent()

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

Set parent controller.

Parameters
parentPointer to IOHomeControlComponent.

Definition at line 36 of file platform_lock.h.

◆ set_status_poll_interval()

void esphome::home_io_control::IOHomeLock::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 48 of file platform_lock.h.

◆ set_subtype()

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

Set the declared device subtype (from YAML).

Parameters
subtypeSubtype value.

Definition at line 45 of file platform_lock.h.

◆ setup()

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

Initialize the lock entity and register it with the shared hub.

Definition at line 15 of file platform_lock.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ device_id_

std::string esphome::home_io_control::IOHomeLock::device_id_
protected

Definition at line 60 of file platform_lock.h.

◆ device_type_

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

Definition at line 61 of file platform_lock.h.

◆ parent_

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

Definition at line 59 of file platform_lock.h.

◆ status_poll_interval_ms_

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

Definition at line 63 of file platform_lock.h.

◆ subtype_

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

Definition at line 62 of file platform_lock.h.


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