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

What the hub has read from one heater so far. More...

#include <proto_heating.h>

Collaboration diagram for esphome::home_io_control::HeatingReadings:

Public Member Functions

bool store (HeatingFunction fn, float value)
 Fold one decoded register value into the readings.
bool clear (HeatingFunction fn)
 Forget a register's value: it reads as "never read" again.
bool has (HeatingFunction fn) const
 Has this register been read yet?
float temperature_of (HeatingFunction fn) const
 The stored temperature of a register read in degrees.
int16_t value_of (HeatingFunction fn) const
 The stored integer value of a register (a mode, a state, a flag, a percentage).

Public Attributes

float room_temperature_c {NAN}
 Measured room temperature; NaN until read or on a sensor fault.
float setpoint_c {NAN}
 Comfort setpoint as the heater holds it; NaN until read.
float max_setpoint_c {NAN}
 Highest setpoint the heater accepts; NaN until read.
int16_t mode {-1}
 HeatingMode value; -1 until read.
int16_t regulator {-1}
 HeatingRegulatorState value; -1 until read.
int16_t window_open {-1}
 0 closed / 1 open; -1 until read.
int16_t open_window_detection {-1}
 1 detection on / 0 off; -1 until read.
int16_t towel_mode {-1}
 TowelDryerMode value; -1 until read.
int16_t temporary_state {-1}
 HeatingTemporaryState value; -1 until read.
int16_t working_rate {-1}
 Working rate, 0-100 %; -1 until read.
float in_force_temperature_c {NAN}
 A towel dryer's temperature in force (register 0x0137); NaN until read.
float eco_setback_k {NAN}
 A towel dryer's eco setback (register 0x0104); NaN until read.
int16_t night_light {-1}
 Night light 1 on / 0 off; -1 until read.
int16_t night_light_brightness {-1}
 Night light brightness, 0-100 %; -1 until read.
int16_t level {-1}
 Low byte of the main parameter of a heater commanded with a prefixed value: a heating level, or a setpoint alias.
int32_t main_parameter {-1}
 The raw current main parameter of a heater commanded with an EXECUTE (a temperature, an alias or a level); -1 until a status reply carried one.

Detailed Description

What the hub has read from one heater so far.

Every field starts as "never read" (NaN, or -1 for the byte registers). Only a decoded reply changes a field, so what an entity shows from here is observed, never predicted.

Definition at line 265 of file proto_heating.h.

Member Function Documentation

◆ clear()

bool esphome::home_io_control::HeatingReadings::clear ( HeatingFunction fn)

Forget a register's value: it reads as "never read" again.

Parameters
fnRegister.
Returns
true when fn is a register the readings hold.

Definition at line 381 of file proto_heating.cpp.

◆ has()

bool esphome::home_io_control::HeatingReadings::has ( HeatingFunction fn) const
nodiscard

Has this register been read yet?

Parameters
fnRegister.
Returns
true when the readings hold a value for fn; false for "never read" and for a function the readings do not hold.

Definition at line 393 of file proto_heating.cpp.

◆ store()

bool esphome::home_io_control::HeatingReadings::store ( HeatingFunction fn,
float value )

Fold one decoded register value into the readings.

Parameters
fnRegister the value was read from.
valueValue as returned by decode_heating_reply().
Returns
true when fn is a register the readings hold (and the field was set).

Definition at line 369 of file proto_heating.cpp.

◆ temperature_of()

float esphome::home_io_control::HeatingReadings::temperature_of ( HeatingFunction fn) const
nodiscard

The stored temperature of a register read in degrees.

Parameters
fnRegister.
Returns
The temperature (a setback in kelvin), or NaN when it has not been read or fn is not a temperature register the readings hold.

Definition at line 400 of file proto_heating.cpp.

◆ value_of()

int16_t esphome::home_io_control::HeatingReadings::value_of ( HeatingFunction fn) const
nodiscard

The stored integer value of a register (a mode, a state, a flag, a percentage).

Lets a heating profile name the register its card reads (its mode or preset register) instead of the caller picking a field.

Parameters
fnRegister.
Returns
The value, or -1 when it has not been read or fn is not an integer register the readings hold (the temperatures are not).

Definition at line 405 of file proto_heating.cpp.

Member Data Documentation

◆ eco_setback_k

float esphome::home_io_control::HeatingReadings::eco_setback_k {NAN}

A towel dryer's eco setback (register 0x0104); NaN until read.

Definition at line 277 of file proto_heating.h.

◆ in_force_temperature_c

float esphome::home_io_control::HeatingReadings::in_force_temperature_c {NAN}

A towel dryer's temperature in force (register 0x0137); NaN until read.

Definition at line 276 of file proto_heating.h.

◆ level

int16_t esphome::home_io_control::HeatingReadings::level {-1}

Low byte of the main parameter of a heater commanded with a prefixed value: a heating level, or a setpoint alias.

-1 until a status reply carried one, and again after a reply that carried a plain temperature. Set by the hub's status path, not by store().

Definition at line 280 of file proto_heating.h.

◆ main_parameter

int32_t esphome::home_io_control::HeatingReadings::main_parameter {-1}

The raw current main parameter of a heater commanded with an EXECUTE (a temperature, an alias or a level); -1 until a status reply carried one.

Set by the hub's status path, not by store().

Definition at line 284 of file proto_heating.h.

◆ max_setpoint_c

float esphome::home_io_control::HeatingReadings::max_setpoint_c {NAN}

Highest setpoint the heater accepts; NaN until read.

Definition at line 268 of file proto_heating.h.

◆ mode

int16_t esphome::home_io_control::HeatingReadings::mode {-1}

HeatingMode value; -1 until read.

Definition at line 269 of file proto_heating.h.

◆ night_light

int16_t esphome::home_io_control::HeatingReadings::night_light {-1}

Night light 1 on / 0 off; -1 until read.

Definition at line 278 of file proto_heating.h.

◆ night_light_brightness

int16_t esphome::home_io_control::HeatingReadings::night_light_brightness {-1}

Night light brightness, 0-100 %; -1 until read.

Definition at line 279 of file proto_heating.h.

◆ open_window_detection

int16_t esphome::home_io_control::HeatingReadings::open_window_detection {-1}

1 detection on / 0 off; -1 until read.

Definition at line 272 of file proto_heating.h.

◆ regulator

int16_t esphome::home_io_control::HeatingReadings::regulator {-1}

HeatingRegulatorState value; -1 until read.

Definition at line 270 of file proto_heating.h.

◆ room_temperature_c

float esphome::home_io_control::HeatingReadings::room_temperature_c {NAN}

Measured room temperature; NaN until read or on a sensor fault.

Definition at line 266 of file proto_heating.h.

◆ setpoint_c

float esphome::home_io_control::HeatingReadings::setpoint_c {NAN}

Comfort setpoint as the heater holds it; NaN until read.

Definition at line 267 of file proto_heating.h.

◆ temporary_state

int16_t esphome::home_io_control::HeatingReadings::temporary_state {-1}

HeatingTemporaryState value; -1 until read.

Definition at line 274 of file proto_heating.h.

◆ towel_mode

int16_t esphome::home_io_control::HeatingReadings::towel_mode {-1}

TowelDryerMode value; -1 until read.

Definition at line 273 of file proto_heating.h.

◆ window_open

int16_t esphome::home_io_control::HeatingReadings::window_open {-1}

0 closed / 1 open; -1 until read.

Definition at line 271 of file proto_heating.h.

◆ working_rate

int16_t esphome::home_io_control::HeatingReadings::working_rate {-1}

Working rate, 0-100 %; -1 until read.

Definition at line 275 of file proto_heating.h.


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