7 static const char *
const TAG =
"gree.climate";
20 uint8_t remote_state[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00};
26 remote_state[2] = 0x60;
27 remote_state[3] = 0x50;
36 remote_state[2] = 0x20;
37 remote_state[3] = 0x50;
38 remote_state[6] = 0x20;
41 remote_state[0] |= (1 << 6);
59 remote_state[7] = ((remote_state[0] << 4) + (remote_state[1] << 4) + 0xC0);
62 ((((remote_state[0] & 0x0F) + (remote_state[1] & 0x0F) + (remote_state[2] & 0x0F) + (remote_state[3] & 0x0F) +
63 ((remote_state[5] & 0xF0) >> 4) + ((remote_state[6] & 0xF0) >> 4) + ((remote_state[7] & 0xF0) >> 4) + 0x0A) &
66 (remote_state[7] & 0x0F);
80 for (
int i = 0; i < 4; i++) {
81 for (uint8_t mask = 1; mask > 0; mask <<= 1) {
83 bool bit = remote_state[i] & mask;
102 for (
int i = 4; i < 8; i++) {
103 for (uint8_t mask = 1; mask > 0; mask <<= 1) {
105 bool bit = remote_state[i] & mask;
119 switch (this->
mode) {
141 return operating_mode;
The fan mode is set to Low.
value_type const & value() const
The fan mode is set to Quiet.
ClimateSwingMode swing_mode
The active swing mode of the climate device.
uint8_t operation_mode_()
const uint32_t GREE_HEADER_SPACE
The fan mode is set to Both.
const uint8_t GREE_PRESET_SLEEP_BIT
float target_temperature
The target temperature of the climate device.
void set_carrier_frequency(uint32_t carrier_frequency)
const uint32_t GREE_MESSAGE_SPACE
const uint8_t GREE_FAN_TURBO_BIT
const uint32_t GREE_BIT_MARK
The climate device is set to heat to reach the target temperature.
const uint8_t GREE_FAN_AUTO
ClimateMode mode
The active mode of the climate device.
const uint8_t GREE_VDIR_SWING
The climate device is set to dry/humidity mode.
const uint32_t GREE_ONE_SPACE
const uint8_t GREE_MODE_FAN
Device is prepared for sleep.
const uint8_t GREE_HDIR_SWING
const uint8_t GREE_MODE_OFF
The fan mode is set to Horizontal.
The climate device is set to cool to reach the target temperature.
const uint8_t GREE_VDIR_MANUAL
The fan mode is set to Auto.
optional< ClimatePreset > preset
The active preset of the climate device.
const uint8_t GREE_PRESET_NONE
std::set< climate::ClimatePreset > presets_
RemoteTransmitterBase * transmitter_
const uint8_t GREE_HDIR_MANUAL
const uint8_t GREE_MODE_AUTO
const uint8_t GREE_MODE_COOL
const uint32_t GREE_HEADER_MARK
The climate device is set to heat/cool to reach the target temperature.
The fan mode is set to Vertical.
void set_model(Model model)
uint8_t vertical_swing_()
const uint8_t GREE_MODE_ON
const uint8_t GREE_MODE_DRY
const uint8_t GREE_PRESET_SLEEP
const uint8_t GREE_FAN_TURBO
The fan mode is set to High.
RemoteTransmitData * get_data()
The climate device is off.
const uint8_t GREE_MODE_HEAT
optional< ClimateFanMode > fan_mode
The active fan mode of the climate device.
const uint32_t GREE_IR_FREQUENCY
void transmit_state() override
const uint32_t GREE_ZERO_SPACE
Implementation of SPI Controller mode.
const uint8_t GREE_VDIR_AUTO
std::set< climate::ClimateFanMode > fan_modes_
const uint8_t GREE_TEMP_MAX
The fan mode is set to Medium.
The climate device only has the fan enabled, no heating or cooling is taking place.
const uint32_t GREE_YAC1FB9_MESSAGE_SPACE
const uint32_t GREE_YAC1FB9_HEADER_SPACE
const uint8_t GREE_TEMP_MIN
uint8_t horizontal_swing_()