7 static const char *
const TAG =
"gree.climate";
12 uint8_t remote_state[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00};
18 remote_state[2] = 0x60;
19 remote_state[3] = 0x50;
28 remote_state[2] = 0x20;
29 remote_state[3] = 0x50;
30 remote_state[6] = 0x20;
33 remote_state[0] |= (1 << 6);
41 remote_state[7] = ((remote_state[0] << 4) + (remote_state[1] << 4) + 0xC0);
44 ((((remote_state[0] & 0x0F) + (remote_state[1] & 0x0F) + (remote_state[2] & 0x0F) + (remote_state[3] & 0x0F) +
45 ((remote_state[5] & 0xF0) >> 4) + ((remote_state[6] & 0xF0) >> 4) + ((remote_state[7] & 0xF0) >> 4) + 0x0A) &
48 (remote_state[7] & 0x0F);
58 for (
int i = 0; i < 4; i++) {
59 for (uint8_t mask = 1; mask > 0; mask <<= 1) {
61 bool bit = remote_state[i] & mask;
76 for (
int i = 4; i < 8; i++) {
77 for (uint8_t mask = 1; mask > 0; mask <<= 1) {
79 bool bit = remote_state[i] & mask;
115 return operating_mode;
The fan mode is set to Low.
value_type const & value() const
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.
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 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
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.
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
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
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
const uint8_t GREE_VDIR_AUTO
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 uint8_t GREE_TEMP_MIN
uint8_t horizontal_swing_()