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).
Public Member Functions inherited from esphome::home_io_control::DeviceBoundEntity
void set_parent (IOHomeControlComponent *parent)
 Set the parent controller component.
void set_device_id (const std::string &id)
 Set the unique IO-homecontrol 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_optimistic_state (bool optimistic_state)
 Enable or disable optimistic target updates for this device (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 Member Functions inherited from esphome::home_io_control::DeviceBoundEntity
void register_device_binding_ (Component *self, bool inverted, std::function< void(const std::string &, const IoDevice &)> on_update)
 Perform the shared setup() registration ritual.
bool passes_binary_update_filter_ (const std::string &id, const IoDevice &dev) const
 Shared inbound-update guard for binary endpoints.
void log_poll_interval_config_ (const char *tag) const
 Emit the shared two-branch poll-interval line for dump_config().

Additional Inherited Members

Protected Attributes inherited from esphome::home_io_control::DeviceBoundEntity
IOHomeControlComponentparent_ {nullptr}
std::string device_id_
DeviceType device_type_ {DeviceType::UNKNOWN}
uint8_t subtype_ {0}
uint32_t status_poll_interval_ms_ {0}
bool optimistic_state_ {true}

Detailed Description

Lock entity for IO-Homecontrol lock devices.

The device-binding setters, setup() registration ritual and poll-interval dump line come from DeviceBoundEntity; the lock state machine (locking/unlocking/locked/unlocked) lives here and uses its own inbound-update guard because it acts on in-flight movement too.

Definition at line 28 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 28 of file platform_lock.cpp.

◆ dump_config()

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

Dump configuration to the log.

Definition at line 65 of file platform_lock.cpp.

Here is the call graph for this function:

◆ 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 36 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 49 of file platform_lock.cpp.

◆ 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:

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