|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Climate entity for IO-Homecontrol heating devices. More...
#include <platform_climate.h>
Public Member Functions | |
| void | setup () override |
| Register the entity with the shared hub and schedule the first poll of the heater. | |
| void | dump_config () override |
| Dump configuration to the log. | |
| float | get_setup_priority () const override |
| Get setup priority (DATA). | |
| climate::ClimateTraits | traits () override |
| Traits from the device's heating profile: its HVAC modes and presets, current temperature and action where the profile has them, and a target range from HEATING_TEMP_MIN_C to the heater's own maximum setpoint (HEATING_TEMP_MAX_C until it has been read) at a 0.5 C step. | |
| void | control (const climate::ClimateCall &call) override |
| Apply a Home Assistant climate control request. | |
| void | set_temperature_range (float min_c, float max_c) |
| Override the temperature encoding range (YAML min_temperature: / max_temperature:) of a heater that carries a temperature in its main parameter; applied to the device in setup(). | |
| 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_silent (bool silent) |
| Send this device's position moves in "silent operation" mode — the reference hub's slower travel profile. | |
| void | set_low_power (bool low_power) |
| Mark this device as a low-power / duty-cycled receiver. | |
| void | set_system_key (const std::string &key) |
| Give this device a system key of its own (system_key: in YAML). | |
| void | set_battery_entities (bool battery_entities) |
| Record that the YAML declared battery: true, so the status log line names the battery level even when the device reports none. | |
| void | set_status_poll_interval (uint32_t poll_interval_ms) |
| Configure bounded follow-up polling while a state change is expected. | |
Protected Member Functions | |
| const HeatingProfile * | profile_ () const |
| The device's heating profile: from the declared type, else from the type the hub learned. | |
| void | on_device_update_ (const std::string &id, const IoDevice &dev) |
| Inbound device-update hook: fold IoDevice::heating into the entity and publish when something it shows changed. | |
| bool | sync_from_readings_ (const HeatingProfile &profile, const HeatingReadings &readings) |
| Copy the readings into the entity's fields. | |
| bool | sync_temperatures_ (const HeatingProfile &profile, const HeatingReadings &readings, bool &seen) |
| Fold the temperatures (current, setpoint, maximum) of the readings into the entity. | |
| bool | sync_action_ (const HeatingProfile &profile, const HeatingReadings &readings, bool mode_known, bool &seen) |
| Fold the regulator state into the entity's action. | |
| bool | apply_observed_state_ (const HeatingProfile &profile, uint8_t wire) |
| Show a device-reported mode register value or heating level. | |
| bool | write_ (const HeatingProfile &profile, HeatingFunction fn, uint8_t wire) |
| Send one preset value (or, on the register and level paths, one mode value) over the profile's control path. | |
| bool | write_preset_ (const HeatingProfile &profile, const HeatingPresetEntry &entry) |
| Send one preset over the profile's control path: a register or level write, or, for a TEMPERATURE_EXECUTE heater, its alias as the main parameter with the entry's functional parameter. | |
| bool | encode_target_ (const HeatingProfile &profile, float celsius, uint16_t &main_parameter) |
| Encode a target temperature as a main parameter over the device's range (the fixed range for a profile that has one). | |
| bool | write_temperature_mode_ (const HeatingProfile &profile, const HeatingModeEntry &entry) |
| Send an HVAC mode to a TEMPERATURE_EXECUTE heater: the mode entry's main parameter (the target temperature for heat on a thermostat) with its functional parameter. | |
| void | confirm_write_ (HeatingFunction fn) |
| Read one register back after an accepted write so the entity shows the heater's value. | |
| bool | apply_mode_ (const HeatingProfile &profile, const climate::ClimateCall &call) |
| Apply the request's HVAC mode, if present. | |
| bool | apply_custom_preset_ (const HeatingProfile &profile, const climate::ClimateCall &call) |
| Apply a custom preset, if present. | |
| bool | apply_preset_ (const HeatingProfile &profile, const climate::ClimateCall &call) |
| Apply a standard preset, if present. | |
| bool | apply_target_temperature_ (const HeatingProfile &profile, const climate::ClimateCall &call) |
| Apply the target temperature, if present. | |
| 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(). | |
Protected Attributes | |
| bool | observed_ {false} |
| True once a reading has been folded in. | |
| bool | has_range_ {false} |
| YAML overrode the temperature encoding range. | |
| float | range_min_c_ {HEATING_TEMPERATURE_RANGE_MIN_C} |
| YAML min_temperature:. | |
| float | range_max_c_ {HEATING_TEMPERATURE_RANGE_MAX_C} |
| YAML max_temperature:. | |
| bool | mode_commanded_ {false} |
| A mode was commanded (matters where nothing reads the mode back). | |
| float | max_temperature_c_ {HEATING_TEMP_MAX_C} |
| Upper end of the target range (heater's own maximum once read). | |
| std::vector< const char * > | custom_presets_ |
| Custom preset names of the profile, registered in setup(). | |
| Protected Attributes inherited from esphome::home_io_control::DeviceBoundEntity | |
| IOHomeControlComponent * | parent_ {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} |
| bool | silent_ {false} |
| bool | low_power_ {false} |
| bool | battery_entities_ {false} |
| bool | has_system_key_ {false} |
| uint8_t | system_key_ [AES_KEY_SIZE] {} |
| Key material: never logged. | |
Climate entity for IO-Homecontrol heating devices.
The device-binding setters and setup() registration ritual come from DeviceBoundEntity; the profile-to-ESPHome mapping and the publish-from-readings discipline live here.
Definition at line 50 of file platform_climate.h.
|
protected |
Apply a custom preset, if present.
Definition at line 266 of file platform_climate.cpp.
|
protected |
Apply the request's HVAC mode, if present.
Definition at line 229 of file platform_climate.cpp.
|
protected |
Show a device-reported mode register value or heating level.
| profile | The device's profile. |
| wire | Value as the device reports it. |
Definition at line 442 of file platform_climate.cpp.
|
protected |
Apply a standard preset, if present.
Definition at line 293 of file platform_climate.cpp.
|
protected |
Apply the target temperature, if present.
Definition at line 321 of file platform_climate.cpp.
|
protected |
Read one register back after an accepted write so the entity shows the heater's value.
| fn | Register that was just written. |
Definition at line 223 of file platform_climate.cpp.
|
override |
Apply a Home Assistant climate control request.
Each requested mode, preset and setpoint is looked up in the profile and sent over its control path. After an accepted register write the register is read back; what the heater answers is what the entity then shows. Only while no read has succeeded yet does an accepted write publish the commanded value. A failed send leaves the entity state untouched.
| call | The requested attribute changes. |
Definition at line 156 of file platform_climate.cpp.
|
override |
Dump configuration to the log.
Definition at line 491 of file platform_climate.cpp.
|
protected |
Encode a target temperature as a main parameter over the device's range (the fixed range for a profile that has one).
| profile | The device's profile. | |
| celsius | The target. | |
| [out] | main_parameter | The encoded value. |
Definition at line 195 of file platform_climate.cpp.
|
inlinenodiscardoverride |
Get setup priority (DATA).
Definition at line 58 of file platform_climate.h.
|
protected |
Inbound device-update hook: fold IoDevice::heating into the entity and publish when something it shows changed.
Ignores updates for other devices.
Definition at line 481 of file platform_climate.cpp.
|
nodiscardprotected |
The device's heating profile: from the declared type, else from the type the hub learned.
Definition at line 78 of file platform_climate.cpp.
|
inline |
Override the temperature encoding range (YAML min_temperature: / max_temperature:) of a heater that carries a temperature in its main parameter; applied to the device in setup().
| min_c | Lower end of the range in degrees Celsius. |
| max_c | Upper end of the range. |
Definition at line 79 of file platform_climate.h.
|
override |
Register the entity with the shared hub and schedule the first poll of the heater.
Definition at line 86 of file platform_climate.cpp.
|
protected |
Fold the regulator state into the entity's action.
| profile | The device's profile. | |
| readings | What the hub has read from the heater. | |
| mode_known | True when the mode or level has been read (an off heater is then not idle). | |
| [in,out] | seen | Set when a reading was present. |
Definition at line 388 of file platform_climate.cpp.
|
protected |
Copy the readings into the entity's fields.
| profile | The device's profile. |
| readings | What the hub has read from the heater. |
Definition at line 409 of file platform_climate.cpp.
|
protected |
Fold the temperatures (current, setpoint, maximum) of the readings into the entity.
| profile | The device's profile. | |
| readings | What the hub has read from the heater. | |
| [in,out] | seen | Set when a reading was present. |
Definition at line 354 of file platform_climate.cpp.
|
override |
Traits from the device's heating profile: its HVAC modes and presets, current temperature and action where the profile has them, and a target range from HEATING_TEMP_MIN_C to the heater's own maximum setpoint (HEATING_TEMP_MAX_C until it has been read) at a 0.5 C step.
A device whose type is not known yet gets the off mode only.
Definition at line 125 of file platform_climate.cpp.
|
protected |
Send one preset value (or, on the register and level paths, one mode value) over the profile's control path.
| profile | The device's profile. |
| fn | Register to write (PRIVATE_REGISTERS only). |
| wire | Register value, or the low byte of a level or alias. |
Definition at line 175 of file platform_climate.cpp.
|
protected |
Send one preset over the profile's control path: a register or level write, or, for a TEMPERATURE_EXECUTE heater, its alias as the main parameter with the entry's functional parameter.
| profile | The device's profile. |
| entry | The preset entry. |
Definition at line 187 of file platform_climate.cpp.
|
protected |
Send an HVAC mode to a TEMPERATURE_EXECUTE heater: the mode entry's main parameter (the target temperature for heat on a thermostat) with its functional parameter.
| profile | The device's profile. |
| entry | The mode entry. |
Definition at line 205 of file platform_climate.cpp.
|
protected |
Custom preset names of the profile, registered in setup().
Definition at line 171 of file platform_climate.h.
|
protected |
YAML overrode the temperature encoding range.
Definition at line 166 of file platform_climate.h.
|
protected |
Upper end of the target range (heater's own maximum once read).
Definition at line 170 of file platform_climate.h.
|
protected |
A mode was commanded (matters where nothing reads the mode back).
Definition at line 169 of file platform_climate.h.
|
protected |
True once a reading has been folded in.
Definition at line 165 of file platform_climate.h.
|
protected |
YAML max_temperature:.
Definition at line 168 of file platform_climate.h.
|
protected |
YAML min_temperature:.
Definition at line 167 of file platform_climate.h.