Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
management_actions.cpp File Reference

Hub-level management actions such as device rename, identify, and force-open. More...

#include "management_actions.h"
#include "hub_internal.h"
#include "proto_commands.h"
#include "esphome/core/application.h"
#include "esphome/core/hal.h"
#include <algorithm>
#include <array>
#include <cctype>
#include <cerrno>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <limits>
#include <map>
#include <span>
#include <vector>
Include dependency graph for management_actions.cpp:

Go to the source code of this file.

Classes

struct  esphome::home_io_control::HeatingNamedValue
 A value token that maps to a fixed float (used by set_mode / set_presence / set_window). More...

Namespaces

namespace  esphome
namespace  esphome::home_io_control
namespace  esphome::home_io_control::detail

Enumerations

enum class  esphome::home_io_control::ScanAddResult : uint8_t { esphome::home_io_control::ADDED , esphome::home_io_control::DUPLICATE , esphome::home_io_control::FULL }
 Outcome of add_scan_responder(), so callers can tell a harmless repeat from real loss. More...

Functions

static std::string esphome::home_io_control::normalize_device_id_argument (const std::string &device_id)
static std::string esphome::home_io_control::bool_to_string (bool value)
static std::string esphome::home_io_control::format_hex_byte (uint8_t value)
 Format a byte as two uppercase hex digits, no prefix.
static ManagementActionResult esphome::home_io_control::make_management_result (const std::string &action, const std::string &device_id)
static bool esphome::home_io_control::apply_error_response (const IoFrame &response, ManagementActionResult &result)
 Decode a CMD_ERROR_RESP frame's result code into result.
static bool esphome::home_io_control::parse_probe_index (const std::string &text, uint8_t &out)
 Parse a probe_device()/probe_sweep() index argument into a byte.
static std::string esphome::home_io_control::normalize_lower_argument (const std::string &value)
 Lowercase + ASCII-trim a native-API string argument.
static bool esphome::home_io_control::match_heating_named_value (const std::string &token, const HeatingNamedValue *table, size_t table_len, float &out)
 Match token against table; on a hit set out and return true.
static bool esphome::home_io_control::parse_heating_temperature (const std::string &value, float &value_out, std::string &error)
 Parse set_temperature's value into degrees Celsius, range-checked.
static bool esphome::home_io_control::parse_heating_arguments (const std::string &function, const std::string &value, HeatingFunction &fn_out, float &value_out, std::string &error)
 Parse the (function, value) argument pair of the heating_control action.
static std::string esphome::home_io_control::format_scan_reply_line (const ScanResponder &responder, const std::string &device_id, bool known)
 Format one roll-call responder's report line(s).
static ScanAddResult esphome::home_io_control::add_scan_responder (ScanResponder *responders, uint8_t &count, uint8_t capacity, const IoFrame &frame, int16_t rssi_dbm)
 Record a responder unless its address is already present.

Detailed Description

Hub-level management actions such as device rename, identify, and force-open.

This file owns advanced management operations that are not part of the normal entity surface. Operations are exposed as ESPHome native API actions so Home Assistant can trigger them without adding always-visible helper entities. All actions share one API service descriptor (detail::ManagementServiceDescriptor); adding a new action is a registration call, not a new descriptor class.

Definition in file management_actions.cpp.