Hagakurje / ESPHome_Gree_AC

24 stars 10 forks source link

Impossible to set target temps #13

Open kevindebosscher opened 8 months ago

kevindebosscher commented 8 months ago

Hi, I added as per documentation. Dallas sensor is measuring actual temp in the room. However not possible to set actual target temps...

Just me or did I overlooked something?

Thx, Kevin issues ac GREE

Hagakurje commented 8 months ago

Don't know, my ac looks good. Is it default ac card? Screenshot 2024-01-02 220244

Oleg-Sob commented 7 months ago

After compilation, there is also no way to set the temperature, since it is set to 0. In any other climate control (for example, in Better Thermostat) you raise the temperature above 16 and everything appears immediately.

Oleg-Sob commented 7 months ago

During compilation it gives an error

In file included from src/main.cpp:43: src/gree_ir.h: In member function 'virtual void GreeAC::control(const esphome::climate::ClimateCall&)': src/gree_ir.h:89:14: warning: enumeration value 'CLIMATE_MODE_AUTO' not handled in switch [-Wswitch] 89 | switch (climateMode) | ^ src/gree_ir.h:133:14: warning: enumeration value 'CLIMATE_FAN_ON' not handled in switch [-Wswitch] 133 | switch (fanMode) | ^ src/gree_ir.h:133:14: warning: enumeration value 'CLIMATE_FAN_OFF' not handled in switch [-Wswitch] src/gree_ir.h:133:14: warning: enumeration value 'CLIMATE_FAN_MIDDLE' not handled in switch [-Wswitch] src/gree_ir.h:133:14: warning: enumeration value 'CLIMATE_FAN_DIFFUSE' not handled in switch [-Wswitch] src/gree_ir.h:133:14: warning: enumeration value 'CLIMATE_FAN_QUIET' not handled in switch [-Wswitch] src/gree_ir.h:164:14: warning: enumeration value 'CLIMATE_SWING_BOTH' not handled in switch [-Wswitch] 164 | switch (swingMode) | ^ src/gree_ir.h:164:14: warning: enumeration value 'CLIMATE_SWING_HORIZONTAL' not handled in switch [-Wswitch]

But compilation still happens and works, but not entirely correctly.

Hagakurje commented 7 months ago

It is just warning, not error. If your AC supports that features, you can add code for them in gree_ir.h.

Oleg-Sob commented 7 months ago

Part of the code doesn't work

ac.setTemp(22);

When rebooting, it sets the temperature to 0, but it needs 22. Therefore, the temperature regulator is not visible.

Hagakurje commented 7 months ago

When rebooting, it sets the temperature to 0, but it needs 22.

Create automation to restore temp after reboot.

Therefore, the temperature regulator is not visible.

I don't know, why regulator is not visible. HA with last updates + EspHome with last updates + default thermostat card - regulator is visible.

kevindebosscher commented 7 months ago

I just found a work-around by starting a little script as HA boots. After the script has been executed; I can set temps IMG_3655

Oleg-Sob commented 7 months ago

You can do this, but it would be good if it worked without a script.

hldh214 commented 5 months ago

My solution is to manually set target_temperature in setup(), like this:

  void setup() override
  {
    ac.begin();
    ac.setMode(kFujitsuAcModeCool);
    ac.setTemp(22);
    ac.setFanSpeed(kFujitsuAcFanAuto);
    ac.setSwing(kFujitsuAcSwingBoth);
    ac.off();

    this->mode = CLIMATE_MODE_OFF;
    this->fan_mode = CLIMATE_FAN_AUTO;
    this->swing_mode = CLIMATE_SWING_BOTH;
    this->target_temperature = 22;  // <---- here
    this->publish_state();
  }