Skip to content

feat: add Field descriptions and metadata to models#42

Merged
eman merged 5 commits intomainfrom
feat/add-field-descriptions
Nov 25, 2025
Merged

feat: add Field descriptions and metadata to models#42
eman merged 5 commits intomainfrom
feat/add-field-descriptions

Conversation

@eman
Copy link
Copy Markdown
Owner

@eman eman commented Nov 25, 2025

Adds comprehensive Field() definitions to DeviceStatus and DeviceFeature models.

Changes

  • Add descriptive help text for each field
  • Add unit of measurement metadata (°F, GPM, %, W, Wh, days, hours, etc.)
  • Add device class hints for Home Assistant integration (temperature, power, energy, signal_strength)

Benefits

  • Enables better documentation generation
  • Improves integration with home automation systems
  • Provides clear field semantics for API consumers

…eature

Add comprehensive Field() definitions with:
- Descriptive help text for each field
- Unit of measurement metadata (°F, GPM, %, W, Wh, etc.)
- Device class hints for Home Assistant integration (temperature, power, energy, signal_strength)

This enables better documentation generation and improves
integration with home automation systems.
@eman eman force-pushed the feat/add-field-descriptions branch from cd6f4ea to 39b46f1 Compare November 25, 2025 02:10
@eman eman requested a review from Copilot November 25, 2025 02:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive Field() metadata and descriptive help text to the DeviceStatus and DeviceFeature models, which will improve code documentation, support home automation system integrations like Home Assistant, and provide clearer API semantics for consumers.

Key changes:

  • Added descriptive help text to all model fields for improved documentation clarity
  • Added unit_of_measurement metadata (°F, GPM, %, W, Wh, days, hours, RPM, etc.) to enable proper value interpretation
  • Added device_class hints (temperature, power, energy, signal_strength) specifically for Home Assistant integration

},
)
freeze_protection_temp_min: HalfCelsiusToF = Field(
description="Minimum freeze protection threshold",
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description for freeze_protection_temp_min in DeviceFeature (line 776) is identical to the description in DeviceStatus (line 673). However, the DeviceFeature field represents a device capability limit, not an active setting. Consider distinguishing the descriptions - for example, 'Minimum configurable freeze protection temperature' in DeviceFeature vs. 'Minimum freeze protection threshold' in DeviceStatus.

Suggested change
description="Minimum freeze protection threshold",
description="Minimum configurable freeze protection temperature",

Copilot uses AI. Check for mistakes.
eman added 4 commits November 24, 2025 18:14
…g descriptions

- dhw_temperature_setting: user-configured target with range info
- dhw_target_temperature_setting: documented as legacy API duplicate
…atus and DeviceFeature

DeviceStatus: Active thresholds (current settings)
DeviceFeature: Configurable limits (capability boundaries)
DeviceStatus: Whether ECO high-temp safety limit is triggered (status)
DeviceFeature: ECO safety switch capability (feature availability)
Updated all DeviceStatus and DeviceFeature field descriptions to match
the comprehensive documentation in docs/protocol/*.rst files. Added:
- Detailed functional descriptions
- Operating ranges and default values
- Technical specifications (power ratings, limits)
- Cross-references to related fields and error codes
- Context about how components work together
@eman eman merged commit 1b1f9c4 into main Nov 25, 2025
10 checks passed
@eman eman deleted the feat/add-field-descriptions branch November 25, 2025 02:27
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.

2 participants