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

Please provide mapping configuration options for configuring HVAC for each entity

Open ezeyg opened this issue 4 months ago • 5 comments

Thank you very much for providing the plugin. Communication with the air conditioning data was normal during use, but there was an HVAC mode mapping error when using the GREE XC70-13/G2 control panel. Modify the source code 'const. py' to DEFAULT-HVAC-PODES=["off", "cool", "heat", "dry", "fan_only", "auto"] and MODES_MAPPING = {"Mod" : {"auto" : 5,"cool" : 1,"dry" : 3,"fan_only" : 4,"heat" : 2}, The mapping relationship has been restored to normal. I hope you can provide configuration items for mapping relationships to adapt to different air conditioning models. Although modifying the source code can temporarily solve the problem, the source code will be overwritten after upgrading the plugin.

ezeyg avatar Aug 29 '25 05:08 ezeyg

Feel free to make a PR that supports the configuring of this mapping! Make sure the current state is the default and it should be good.

One small remark, we are currently working on a gigantic PR. So it might be advisable to wait until that PR is merged before you start coding :).

RobHofmann avatar Aug 29 '25 13:08 RobHofmann

Am I understanding that this device uses a different value for hvac_modes?

domialex avatar Sep 02 '25 17:09 domialex

Feel free to make a PR that supports the configuring of this mapping! Make sure the current state is the default and it should be good.

One small remark, we are currently working on a gigantic PR. So it might be advisable to wait until that PR is merged before you start coding :).

Hi, sorry for hijacking this thread. But since you mention the gigantic PR, I'm also currently doing one for this integration, you can check it at https://github.com/p-monteiro/HomeAssistant-GreeClimateComponent-Rewrite It's currently missing a few things (config migration/yaml loading, being the most important), hence why I didn't make a merge request. I intend to keep working on it until it has full feature parity, but now am wondering if it greatly clatches with what you've been doing. Feel free to take a look at it. I actually wanted to discuss my approach with you but found no way to contact you.

p-monteiro avatar Sep 21 '25 15:09 p-monteiro

@p-monteiro The refactor is already merged and you can take a look at it and compare. It wouldn't surprise me if both codebases share the same structure. Having a "typed" objects for the params would be beneficial.

domialex avatar Sep 21 '25 18:09 domialex

@domialex oh if it's what's already on the main branch I'm good. My code is very different structurally as you can check. I think it's a good step.

p-monteiro avatar Sep 21 '25 18:09 p-monteiro