Skip to content

Enhance dynamic zone control and fix entity visibility issues#27

Open
fengchupc wants to merge 12 commits into
Connectlife-LLC:mainfrom
fengchupc:main
Open

Enhance dynamic zone control and fix entity visibility issues#27
fengchupc wants to merge 12 commits into
Connectlife-LLC:mainfrom
fengchupc:main

Conversation

@fengchupc
Copy link
Copy Markdown

This pull request adds robust support for dynamic zone damper controls (0–100%) for ducted/zone HVAC models, improving both backend parsing and Home Assistant entity creation. It introduces logic to detect and expose zone damper controls even when their keys or ranges are not predefined, ensuring compatibility with a wide variety of device models and configurations. Additionally, it enhances translation coverage for zone-related attributes and improves entity naming, uniqueness, and categorization to avoid duplication and clutter.

Dynamic zone damper support:

  • Added logic in api.py to dynamically detect and register zone damper attributes from the device's property list, including parsing value ranges and step sizes for non-predefined zone keys. This enables support for a broader set of ducted/zone models.
  • Implemented two new builder functions in number.py to create zone damper number entities from both parser metadata and device status, ensuring damper controls are available even if parser data is incomplete. (F3bd3e66L51R201)
  • Updated the entity setup process to add zone damper controls, avoid duplicate entities, and provide a fallback for missing parser data. [1] [2]

Translations and naming:

  • Expanded translation dictionaries in api.py to include zone and damper keys for both Chinese and English, improving display names in the UI. [1] [2]
  • Enhanced the HisenseNumber entity in number.py to generate unique IDs for zone damper controls, use translated or context-aware names, and display real-time damper percentages in the entity name when available. [1] [2] [3]

Entity behavior and categorization:

  • Set zone damper controls to appear in the Home Assistant configuration section to reduce UI clutter, and ensured that damper entities remain available as long as the device is online. [1] [2]
  • Improved value handling for damper controls by sending integer values to the device, addressing compatibility issues with certain controllers.

Imports and minor improvements:

  • Added imports for re and EntityCategory in both number.py and switch.py to support new features and entity categorization. [1] [2]

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