7 static const char *
const TAG =
"mitsubishi.climate";
26 uint32_t remote_state[18] = {0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x08, 0x00, 0x30,
27 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
48 ESP_LOGV(TAG,
"Sending Mitsubishi target temp: %.1f state: %02" PRIX32
" mode: %02" PRIX32
" temp: %02" PRIX32,
52 for (
int i = 0; i < 17; i++) {
53 remote_state[17] += remote_state[i];
61 for (uint16_t r = 0; r < 2; r++) {
63 data->mark(MITSUBISHI_HEADER_MARK);
64 data->space(MITSUBISHI_HEADER_SPACE);
66 for (uint8_t i : remote_state) {
67 for (uint8_t j = 0; j < 8; j++) {
68 data->mark(MITSUBISHI_BIT_MARK);
69 bool bit = i & (1 << j);
70 data->space(bit ? MITSUBISHI_ONE_SPACE : MITSUBISHI_ZERO_SPACE);
75 data->mark(MITSUBISHI_BIT_MARK);
76 data->space(MITSUBISHI_MIN_GAP);
79 data->mark(MITSUBISHI_BIT_MARK);
const uint16_t MITSUBISHI_MIN_GAP
const uint16_t MITSUBISHI_ONE_SPACE
const uint8_t MITSUBISHI_AUTO
float target_temperature
The target temperature of the climate device.
void set_carrier_frequency(uint32_t carrier_frequency)
The climate device is set to heat to reach the target temperature.
ClimateMode mode
The active mode of the climate device.
const uint32_t MITSUBISHI_OFF
void transmit_state() override
Transmit via IR the state of this climate controller.
const uint16_t MITSUBISHI_BIT_MARK
const uint8_t MITSUBISHI_HEAT
The climate device is set to cool to reach the target temperature.
const uint8_t MITSUBISHI_FAN_AUTO
const uint8_t MITSUBISHI_TEMP_MAX
const uint16_t MITSUBISHI_HEADER_SPACE
const uint16_t MITSUBISHI_HEADER_MARK
The climate device is set to heat/cool to reach the target temperature.
RemoteTransmitData * get_data()
The climate device is off.
const uint8_t MITSUBISHI_DRY
Implementation of SPI Controller mode.
const uint8_t MITSUBISHI_TEMP_MIN
const uint16_t MITSUBISHI_ZERO_SPACE
remote_transmitter::RemoteTransmitterComponent * transmitter_
const uint8_t MITSUBISHI_COOL