6 namespace uponor_smatrix {
8 static const char *
const TAG =
"uponor_smatrix.climate";
11 LOG_CLIMATE(
"",
"Uponor Smatrix Climate",
this);
12 ESP_LOGCONFIG(TAG,
" Device address: 0x%04X", this->
address_);
16 const uint32_t now =
millis();
54 UponorSmatrixData data[] = {{UPONOR_ID_TARGET_TEMP, 0}, {UPONOR_ID_TARGET_TEMP, temp}};
55 this->
send(data,
sizeof(data) /
sizeof(data[0]));
60 for (
int i = 0; i < data_len; i++) {
62 case UPONOR_ID_TARGET_TEMP_MIN:
65 case UPONOR_ID_TARGET_TEMP_MAX:
68 case UPONOR_ID_TARGET_TEMP:
71 if (data[i].value != UPONOR_INVALID_VALUE)
74 case UPONOR_ID_ECO_SETBACK:
77 case UPONOR_ID_DEMAND:
78 if (data[i].value & 0x1000) {
89 case UPONOR_ID_ROOM_TEMP:
92 case UPONOR_ID_HUMIDITY:
void control(const climate::ClimateCall &call) override
This class is used to encode all control actions on a climate device.
float current_humidity
The current humidity of the climate device, as reported from the integration.
float raw_to_celsius(uint16_t raw)
void on_device_data(const UponorSmatrixData *data, size_t data_len) override
uint16_t eco_setback_value_raw_
float target_temperature
The target temperature of the climate device.
void set_supports_current_humidity(bool supports_current_humidity)
This class contains all static data for climate devices.
void set_visual_min_temperature(float visual_min_temperature)
The climate device is set to heat to reach the target temperature.
void set_visual_target_temperature_step(float temperature_step)
ClimateMode mode
The active mode of the climate device.
uint16_t target_temperature_raw_
void set_visual_current_temperature_step(float temperature_step)
float current_temperature
The current temperature of the climate device, as reported from the integration.
climate::ClimateTraits traits() override
void set_supported_presets(std::set< ClimatePreset > presets)
uint32_t IRAM_ATTR HOT millis()
void dump_config() override
The climate device is set to cool to reach the target temperature.
optional< ClimatePreset > preset
The active preset of the climate device.
bool send(const UponorSmatrixData *data, size_t data_len)
void set_supported_modes(std::set< ClimateMode > modes)
float get_visual_target_temperature_step() const
ClimateTraits get_traits()
Get the traits of this climate device with all overrides applied.
void set_visual_max_temperature(float visual_max_temperature)
The climate device is actively heating.
const optional< float > & get_target_temperature() const
void publish_state()
Publish the state of the climate device, to be called from integrations.
void set_supports_action(bool supports_action)
Implementation of SPI Controller mode.
The climate device is idle (monitoring climate but no action needed)
Device is running an energy-saving preset.
void set_supports_current_temperature(bool supports_current_temperature)
The climate device is actively cooling.
bool set_preset_(ClimatePreset preset)
Set preset. Reset custom preset. Return true if preset has been changed.
ClimateAction action
The active state of the climate device.
uint16_t celsius_to_raw(float celsius)