ESPHome 2026.4.0-dev
Loading...
Searching...
No Matches
mitsubishi_cn105_climate.cpp
Go to the documentation of this file.
1#include <cinttypes>
3#include "esphome/core/log.h"
4
6
7static const char *const TAG = "mitsubishi_cn105.climate";
8
10 LOG_CLIMATE("", "Mitsubishi CN105 Climate", this);
11 ESP_LOGCONFIG(TAG,
12 " Update interval: %" PRIu32 " ms\n"
13 " UART: baud_rate=%" PRIu32 " data_bits=%u parity=%s stop_bits=%u",
14 this->hp_.get_update_interval(), this->parent_->get_baud_rate(), this->parent_->get_data_bits(),
15 LOG_STR_ARG(parity_to_str(this->parent_->get_parity())), this->parent_->get_stop_bits());
16}
17
19
21 if (this->hp_.update()) {
22 this->apply_values_();
23 }
24}
25
38
40
42 const auto &status = this->hp_.status();
43
44 this->target_temperature = status.target_temperature;
45 this->current_temperature = status.room_temperature;
46
47 this->publish_state();
48}
49
50} // namespace esphome::mitsubishi_cn105
uint8_t status
Definition bl0942.h:8
This class is used to encode all control actions on a climate device.
Definition climate.h:33
float target_temperature
The target temperature of the climate device.
Definition climate.h:251
float current_temperature
The current temperature of the climate device, as reported from the integration.
Definition climate.h:244
void publish_state()
Publish the state of the climate device, to be called from integrations.
Definition climate.cpp:436
void set_visual_max_temperature(float visual_max_temperature)
void add_feature_flags(uint32_t feature_flags)
void set_visual_temperature_step(float temperature_step)
void set_visual_min_temperature(float visual_min_temperature)
void set_visual_current_temperature_step(float temperature_step)
void control(const climate::ClimateCall &call) override
UARTParityOptions get_parity() const
UARTComponent * parent_
Definition uart.h:73
@ CLIMATE_SUPPORTS_CURRENT_TEMPERATURE