7namespace uponor_smatrix {
9static const char *
const TAG =
"uponor_smatrix.climate";
12 LOG_CLIMATE(
"",
"Uponor Smatrix Climate",
this);
13 ESP_LOGCONFIG(TAG,
" Device address: 0x%04X", this->
address_);
46 if (
call.get_target_temperature().has_value()) {
55 UponorSmatrixData data[] = {{UPONOR_ID_TARGET_TEMP, 0}, {UPONOR_ID_TARGET_TEMP, temp}};
56 this->
send(data,
sizeof(data) /
sizeof(data[0]));
61 for (
int i = 0; i < data_len; i++) {
63 case UPONOR_ID_TARGET_TEMP_MIN:
66 case UPONOR_ID_TARGET_TEMP_MAX:
69 case UPONOR_ID_TARGET_TEMP:
72 if (data[i].value != UPONOR_INVALID_VALUE)
75 case UPONOR_ID_ECO_SETBACK:
78 case UPONOR_ID_DEMAND:
79 if (data[i].value & 0x1000) {
90 case UPONOR_ID_ROOM_TEMP:
93 case UPONOR_ID_HUMIDITY:
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
This class is used to encode all control actions on a climate device.
ClimateMode mode
The active mode of the climate device.
ClimateTraits get_traits()
Get the traits of this climate device with all overrides applied.
float target_temperature
The target temperature of the climate device.
float current_humidity
The current humidity of the climate device, as reported from the integration.
bool set_preset_(ClimatePreset preset)
Set preset. Reset custom preset. Return true if preset has been changed.
float current_temperature
The current temperature of the climate device, as reported from the integration.
ClimateAction action
The active state of the climate device.
void publish_state()
Publish the state of the climate device, to be called from integrations.
optional< ClimatePreset > preset
The active preset of the climate device.
This class contains all static data for climate devices.
void set_visual_max_temperature(float visual_max_temperature)
void set_supported_modes(std::set< ClimateMode > modes)
void set_supports_action(bool supports_action)
void set_supports_current_humidity(bool supports_current_humidity)
void set_visual_target_temperature_step(float temperature_step)
void set_visual_min_temperature(float visual_min_temperature)
float get_visual_target_temperature_step() const
void set_visual_current_temperature_step(float temperature_step)
void set_supported_presets(std::set< ClimatePreset > presets)
void set_supports_current_temperature(bool supports_current_temperature)
uint16_t target_temperature_raw_
uint16_t eco_setback_value_raw_
void control(const climate::ClimateCall &call) override
void on_device_data(const UponorSmatrixData *data, size_t data_len) override
climate::ClimateTraits traits() override
void dump_config() override
bool send(const UponorSmatrixData *data, size_t data_len)
@ CLIMATE_PRESET_NONE
No preset is active.
@ CLIMATE_PRESET_ECO
Device is running an energy-saving preset.
@ CLIMATE_MODE_HEAT
The climate device is set to heat to reach the target temperature.
@ CLIMATE_MODE_COOL
The climate device is set to cool to reach the target temperature.
@ CLIMATE_ACTION_IDLE
The climate device is idle (monitoring climate but no action needed)
@ CLIMATE_ACTION_HEATING
The climate device is actively heating.
@ CLIMATE_ACTION_COOLING
The climate device is actively cooling.
uint16_t celsius_to_raw(float celsius)
float raw_to_celsius(uint16_t raw)
Providing packet encoding functions for exchanging data with a remote host.
uint32_t IRAM_ATTR HOT millis()
Application App
Global storage of Application pointer - only one Application can exist.