Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
hub_management.cpp
Go to the documentation of this file.
1/// @file hub_management.cpp
2/// @brief Thin hub wrapper delegating management actions to ManagementActions.
3/// @ingroup hioc_hub
4///
5/// All management logic lives in management_actions.cpp. This file provides only the
6/// IOHomeControlComponent::rename_device() / identify_device() / force_open_device() /
7/// scan_paired_devices() implementations that the virtual dispatch table requires.
8
9#include "hub_internal.h"
10
11namespace esphome {
12namespace home_io_control {
13
14/// Rename a registered device and verify by reading the name back.
15///
16/// Thin wrapper that delegates to management_actions_.rename_device() so that
17/// the virtual dispatch defined in hub_core.h is fulfilled.
19 const std::string &new_name) {
20 return this->management_actions_.rename_device(device_id, new_name);
21}
22
23/// Trigger a registered device's physical identify (jog/flash).
24///
25/// Thin wrapper that delegates to management_actions_.identify_device() so that
26/// the virtual dispatch defined in hub_core.h is fulfilled.
28 return this->management_actions_.identify_device(device_id);
29}
30
31/// Move a cover device to fully open at elevated priority, intended to bypass wind/rain
32/// soft locks.
33///
34/// Thin wrapper that delegates to management_actions_.force_open_device() so that
35/// the virtual dispatch defined in hub_core.h is fulfilled.
37 return this->management_actions_.force_open_device(device_id);
38}
39
40/// Broadcast a roll-call and report every device that answers.
41///
42/// Thin wrapper that delegates to management_actions_.scan_paired_devices() so that
43/// the virtual dispatch defined in hub_core.h is fulfilled.
47
48} // namespace home_io_control
49} // namespace esphome
virtual ManagementActionResult force_open_device(const std::string &device_id)
Move a cover device to fully open at elevated priority, intended to bypass wind/rain soft locks.
virtual ManagementActionResult rename_device(const std::string &device_id, const std::string &new_name)
Rename a device and verify the result by reading the name back.
virtual ManagementActionResult identify_device(const std::string &device_id)
Trigger a device's physical identify (brief jog/flash) so a user can confirm which physical motor a d...
esphome::home_io_control::ManagementActionResult ManagementActionResult
Result payload used by hub-level management actions such as rename.
Definition hub_core.h:87
ManagementActions management_actions_
Owns rename, identify, force-open, scan_paired_devices, and other hub-level HA actions.
Definition hub_core.h:765
virtual ManagementActionResult scan_paired_devices()
Broadcast a roll-call and report every device that answers (see ManagementActions::scan_paired_device...
Internal helpers shared by the hub implementation .cpp files.