Custom Gree climate component written in Python3 for Home Assistant. Controls ACs supporting the Gree protocol.
For a comprehensive list of tested devices, see Supported Devices.
Tested on Home Assistant 2025.6.3
If you are experiencing issues please be sure to provide details about your device, Home Assistant version and what exactly went wrong.
If your HVAC has already been configured to be controlled remotely by an android app, the encryption key might have changed.
To configure HVAC wifi (without the android app): https://github.com/arthurkrupa/gree-hvac-mqtt-bridge#configuring-hvac-wifi
Sources used:
- https://github.com/tomikaa87/gree-remote
- https://github.com/vpnmaster/homeassistant-custom-components
- https://developers.home-assistant.io/
This component is added to HACS default repository list.
The integration can be added from the Home Assistant UI.
- Navigate to Settings > Devices & Services and click Add Integration.
- Search for Gree Climate and fill in the desired
name,host,portandMAC address. - After setup you can open the integration options to configure additional parameters.
- Saving any changes in the options dialog automatically reloads the integration, so new settings take effect immediately without restarting Home Assistant.
-
(Skip if using HACS) Copy the
custom_componentsfolder to your own hassio/configfolder. -
YAML Configuration: See
manual-configuration.yamlfor a complete configuration example with all available options and detailed comments.Basic example:
gree: - name: "First AC" host: "192.168.1.101" mac: "20-FA-BB-12-34-56" encryption_version: 2
-
In your configuration.yaml add the following:
climate: !include your_configuration.yaml
-
(Optional) Add info logging to this component (to see if/how it works)
logger: default: error logs: custom_components.gree: debug custom_components.gree.climate: debug
-
(Optional) Provide encryption key if you have it or feel like extracting it.
One way is to pull the sqlite db from android device like described here:
https://stackoverflow.com/questions/9997976/android-pulling-sqlite-database-android-device
adb backup -f ~/backup.ab -noapk com.gree.ewpesmart dd if=data.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar -xvf - sqlite3 data.ab 'select privateKey from db_device_20170503;' # but table name can differ a little bit.
Write it down in
climate.yaml:encryption_key: <key>.If you are getting an UTF-8 error (like: "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xda in position 1: invalid continuation byte"), see RobHofmann#318.
-
(Optional) Provide the
uidparameter (can be sniffed). This is not needed for all devices. -
(Optional) You can set custom icons by modifying the icon translation file
icons.json. Refer to this documentation: https://developers.home-assistant.io/docs/core/integration-quality-scale/rules/icon-translations/