Skip to content

Feature: Add support for Gree Cloud - #499

Open
p-monteiro wants to merge 24 commits into
RobHofmann:4.0-pre-releasefrom
p-monteiro:cloud-support
Open

Feature: Add support for Gree Cloud#499
p-monteiro wants to merge 24 commits into
RobHofmann:4.0-pre-releasefrom
p-monteiro:cloud-support

Conversation

@p-monteiro

@p-monteiro p-monteiro commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

This is another big PR with many improvements:

Development Experience:
Now there is a properly configured dev container that gets a dev ready to work with all the environment requirements. This allows us to remove the need to inject ourselves into the official HA container during development. It also has the advantage of having a stable and verifiable development environment.

aiogree - The library:

  • Add support for the Humidity Control feature
  • Abstract the concept of a Transport
  • Transport has the capability to set batch_support on requests
  • Status requests will be batched if a single request is too large
  • Created UdpTransport for local devices
  • Created MqttTransport for cloud devices
  • Removed dependency on pycryptodome and used cryptography
  • Extract device state from the device to DeviceState
  • Extract communication from the device to DeviceApiClient
  • DeviceApiClient allows getting and setting generic properties from a string list
  • Added GreeCloudApi to interface with the Cloud API
  • Discover devices now returns local and cloud devices
  • Reworked binding and device info logic in GreeDevice
  • Don't rely on set status responses for state logic; prefer a fetch afterwards
  • Add sensor groups for sensors that report the same concept through multiple props
  • Initial implementation to check for device firmware updates
  • Improve the consistency of the AC special modes
  • Improved debugging messages
  • Added more unknown device properties for debug
  • General code cleanup and linting fixes

Integration:

  • Normalize entity creation so the same process is shared between platforms
  • Immediately update status when changing auto light and x-fan
  • Bumped config version to adapt to new aiogree features
  • Proper transport and entity cleanup on unload
  • New config_flow steps that merge cloud and local devices
  • General code cleanup and linting fixes

Next steps:

  • Update manual-configuration docs
  • Update README
  • Add overall architecture docs

This improves the error handling and ensures a better valid state for the unit following the remote/app behaviour.
Adds more errors in the API and hadles them in HA.
Also, this provides the initial steps to support other sleep modes.
Uses a select for the mode and a number for the humidity target.
As far as I can see, having bothe properties at 0 is invalid and should mean the feature is not supported.  Revisit this if there are reported problems.
This makes more sense as Humity Control as 3 modes and is available in both Dry and Cool.
Move common logic to platform helpers and normalize the entity creation logic
Allows a proper reproducible development environment to this integration
This commit has a big changeset:
* Abstract the concept of a Transport
* Transport has the capability to set batch_support on requests
* Status requests will be batched if a single request is too large
* Created `UdpTransport` for local devices
* Created `MqttTransport` for cloud devices
* Remove dependency on pycryptodome and use cryptography
* Extract device state from the device to `DeviceState`
* Extract communication from the device to `DeviceApiClient`
* `DeviceApiClient` allows getting and setting generic properties from a string list
* `DeviceApiClient` allows getting and setting generic properties from a string list
* Added `GreeCloudApi` to interface with the Cloud API
* Discover devices now returns local and cloud devices
* Reworked binding and device info logic in `GreeDevice`
* Don't rely on set status responses for state logic, prefer a fetch aftwerwards
* Add sensor groups for sensors that report the same concept through multiple props
* Initial implementation to check for device firmware updates
* Improve the consistency of the AC special modes
* Improved debugging messages
* Added more unknown device properties for debug
* General code cleanup and linting fixes
* Imediately update status when changing auto light and x-fan
* General code cleanup and linting fixes
Use a new version for the config entries that supports multiple devices under the same entry. One entry per Gree account and Local-only devices are in a separate entry.
Config Flow adjusted for this new version

aiogree: moved controller MAC to the binding process as it can differ between UDP and MQTT transports
Closely follow official HA container creation
Reuse tasks
Simplify platform context into Coordinator
Add device connection cleanup
Fix config flow user_input for connections
Expose model id in DeviceInfo
Fix MQTT transport errors
Multiple linting errors corrected
In case of multiple devices in a config entry, if one fails, report the issue to the user, but procceed with the remaining devices.
- Corrected typo in `check_availability` parameter in coordinator.py.
- Added DHCP support for specific MAC addresses in manifest.json.
- Introduced new helper functions for entity ID resolution and config entry management in helpers.py.
- Updated English and Portuguese translations for better clarity and consistency.
- Enhanced config flow steps for device discovery and configuration in translations.
- Use proper entity selectors
- Improved error messages and descriptions for better user experience.
@p-monteiro
p-monteiro marked this pull request as draft September 2, 2026 21:16
@p-monteiro
p-monteiro changed the base branch from master to 4.0-pre-release September 2, 2026 21:17
@p-monteiro
p-monteiro marked this pull request as ready for review September 2, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant