HomeAssistant-GreeClimateComponent icon indicating copy to clipboard operation
HomeAssistant-GreeClimateComponent copied to clipboard

Add helper buttons to enable HVAC features

Open michalk-k opened this issue 3 months ago • 11 comments

Describe the bug Since v3.0 of the integratino some features are not available (grayed out) while I'm sure my AC is equipped with them. I'm sure my unit has:

  • 8 degree mode
  • Sleep
  • Power Save (official name is Energy Saving Mode)

My AC unit is: TOSOT TWH12AFC-K6DNA2F/I

Image

michalk-k avatar Sep 03 '25 18:09 michalk-k

Experiencing the same with Sinclair SIH-18BIK.

At least this unit should have:

  • 8 °C Heat
  • Sleep

Hy3n4 avatar Sep 03 '25 18:09 Hy3n4

As per docs:

8°C Heat: Enables or disables the 8°C heating mode for frost protection. Only available in heating mode
Sleep: Enables or disables the sleep mode for comfortable overnight operation. Only available in cooling or heating mode
Power Save: Enables or disables the power saving mode for energy efficiency. Only available in cooling mode

Make sure the device is in heating/cooling mode for these toggles to become available.

@domialex maybe we should reconsider making them available at all times and changing states according to the switches being set. We've had a few issues already in the past 24h on this.

RobHofmann avatar Sep 03 '25 19:09 RobHofmann

Oh, now I see. It becomes available when the unit is actually running (in any of supported modes). When the AC is turned off, the sleep switch becomes unavailable.

I'd rather have it available all the time.

Hy3n4 avatar Sep 03 '25 20:09 Hy3n4

@RobHofmann I don't have an opinion on this, I left the logic intact. We can remove the condition checks, but I have no idea how the AC unit reacts when sending incorrect parameters. Maybe the commands need to also change the HVAC modes accordingly for consistency? Maybe it's simpler to not assume anything and just leave the switches available and not change the behavior behind. Your call.

domialex avatar Sep 03 '25 23:09 domialex

I think we should make it available and reflect the correct states after enabling it (so setting the mode accordingly etc.).

@domialex feel free to do this. If not, i'll try to pick it up a.s.a.p. Not sure when; my schedule is extremely busy at the moment.

RobHofmann avatar Sep 04 '25 07:09 RobHofmann

@RobHofmann Ok, I actually forged an opinion on this. When I first did the refactor, I wanted the switches to adapt to the HVAC's modes, and even considered combining some (like X-Fan and Auto X-Fan). But that approach goes against Home Assistant's best practices, since it prevents users from accessing the actual state of a feature inside the AC unit.

So if we want to add a way to enable something like 8°C Heat, it should be implemented as a separate button, not a switch. The Heat switch would still exist, best of both worlds. Thoughts? If you agree, please change the title of the issue to something like "Add buttons to enable Sleep, Power Save and 8c Heat"

domialex avatar Sep 05 '25 21:09 domialex

Hmm so the toggles would become buttons pretty much (or some of them at least).

What do you mean by "Heat switch would still exist, best of both worlds."? You mean the HVAC Mode?

RobHofmann avatar Sep 08 '25 13:09 RobHofmann

@RobHofmann It means that we still keep a switch entity for every state of the HVAC, but add control buttons to enable those special modes. Kind of like "helper" entities in HA. This way the user can still read the actual state value of the unit. Short answer, having state switches that do multiple actions are not a good practice. 1 state = 1 switch. If you agree with the idea, can you rename the issue title to something appropriate to the feature?

domialex avatar Sep 08 '25 13:09 domialex

Hmm so you want to leverage the switch platform to read states? I'd rather use input_boolean then. If its just for reading the state.

Or maybe even better: can we add it to the attributes of the climate entity (i'm not sure)?

RobHofmann avatar Sep 08 '25 13:09 RobHofmann

@RobHofmann No I don't change the current behavior of the switches, I'll just remove the availability checks. Consider this issue as "Add helper buttons to enable X"

domialex avatar Sep 08 '25 13:09 domialex

Alright. I've modified the title. Looking forward to seeing it into effect.

RobHofmann avatar Sep 08 '25 13:09 RobHofmann