Skip to content

Conversation

@jason0x43
Copy link
Owner

Update types and API uses for latest HA release.

@jason0x43 jason0x43 requested a review from Copilot October 8, 2025 02:51
Copy link

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 updates the integration to be compatible with the latest Home Assistant release by modernizing type annotations, API usage patterns, and entity class hierarchy. The changes primarily involve updating from legacy typing imports and adjusting entity inheritance patterns.

  • Replaces typing.List with built-in list type hints for modern Python compatibility
  • Updates entity class inheritance order to follow Home Assistant's preferred pattern
  • Adds comprehensive test coverage for new valve entity functionality

Reviewed Changes

Copilot reviewed 47 out of 48 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_valve.py Adds complete test coverage for valve entity including state management and device class detection
tests/test_switch.py Updates type annotations from List to list and improves parameter typing
tests/test_sensor.py Adds comprehensive sensor entity test coverage with proper attribute handling
tests/test_lock.py Enhances test data structure to include required dataType and unit fields
tests/test_light.py Adds full test coverage for light entities with color mode and brightness testing
tests/test_fan.py Adds comprehensive fan entity test coverage including speed and preset mode handling
tests/test_entities.py Updates import paths and type annotations for entity management functions
tests/test_cover.py Adds complete test coverage for cover entities including garage doors and window shades
tests/test_config_flow.py Improves type safety with proper Mock type annotations
tests/test_climate.py Adds comprehensive thermostat entity test coverage with HVAC mode testing
tests/test_binary_sensor.py Adds full test coverage for binary sensor entities with various device types
tests/hubitatmaker/test_types.py Updates type annotations and improves string concatenation patterns
tests/hubitatmaker/test_hub.py Modernizes type annotations and improves test structure
tests/helper_types.py Updates import path for Hub class
pyproject.toml Updates Python version requirement and development tool configuration
home_assistant Adds development script for running Home Assistant containers
custom_components/hubitat/valve.py Fixes entity inheritance order and improves type safety
custom_components/hubitat/util.py Enhances type safety with proper casting and formatting
custom_components/hubitat/switch.py Updates entity inheritance order and fixes name property access
custom_components/hubitat/services.py Improves type safety and error handling in service implementations
custom_components/hubitat/sensor.py Updates entity inheritance order and improves type annotations
custom_components/hubitat/select.py Updates entity inheritance order for consistency
custom_components/hubitat/lock.py Updates entity inheritance order to match Home Assistant patterns
custom_components/hubitat/light.py Fixes entity inheritance order and improves attribute type safety
custom_components/hubitat/hubitatmaker/types.py Modernizes type annotations and improves type safety throughout
custom_components/hubitat/hubitatmaker/server.py Updates type annotations and improves error handling
custom_components/hubitat/hubitatmaker/hub.py Enhances type safety with proper casting and improved error handling
custom_components/hubitat/hubitatmaker/error.py Simplifies error handling and removes unnecessary type workarounds
custom_components/hubitat/hubitatmaker/const.py Adds missing device attribute constant for last update tracking
custom_components/hubitat/hub.py Improves type safety throughout hub management with proper casting
custom_components/hubitat/helpers.py Updates import paths and improves type safety
custom_components/hubitat/fan.py Updates entity inheritance order and improves formatting
custom_components/hubitat/event.py Updates entity inheritance order and improves event attribute handling
custom_components/hubitat/entities.py Improves type safety in entity creation and management
custom_components/hubitat/device_trigger.py Modernizes imports and improves type safety in trigger handling
custom_components/hubitat/device.py Updates entity base class and improves type annotations
custom_components/hubitat/cover.py Updates entity inheritance order and improves type safety
custom_components/hubitat/const.py Improves class structure with proper type annotations
custom_components/hubitat/config_flow.py Enhances type safety with proper casting in configuration flow
custom_components/hubitat/climate.py Updates entity inheritance order and improves humidity handling for HA compatibility
custom_components/hubitat/binary_sensor.py Updates entity inheritance order for consistency
custom_components/hubitat/alarm_control_panel.py Updates entity inheritance order and improves type safety
custom_components/hubitat/init.py Simplifies domain data management with improved type safety
README.md Adds CI workflow badge for build status visibility
AGENTS.md Adds comprehensive AI agent guidance documentation
.pre-commit-config.yaml Updates type checker from pyright to basedpyright
.github/workflows/ci.yml Adds comprehensive CI workflow with linting, type checking, and testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jason0x43 jason0x43 merged commit 6b0a265 into master Nov 2, 2025
1 check passed
@jason0x43 jason0x43 deleted the update-ha branch November 2, 2025 16:46
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