Skip to content

Fix anti-windup blocking and pyright/left errors#16

Merged
enoch85 merged 16 commits into
mainfrom
fix/import-organization
Feb 4, 2026
Merged

Fix anti-windup blocking and pyright/left errors#16
enoch85 merged 16 commits into
mainfrom
fix/import-organization

Conversation

@enoch85

@enoch85 enoch85 commented Feb 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

- Move all TYPE_CHECKING blocks after regular imports (fixes Pylint C0413)
- Remove unused 'Any' imports where not needed
- Create TypedDict for configuration dictionaries (AdapterConfigDict, EffektGuardConfigDict)
- Fix implicit string concatenation in weather_adapter
- Add entity_registry import to config_flow.py top-level
- Remove inline datetime.timedelta imports (use top-level import)
- Replace SensorEntityDescription inheritance with composition to avoid Pylance false positives
- Configure Pylance to suppress known HA type stub issues in .vscode/settings.json
- Add pylint line-too-long ignore configuration

All 1107 tests passing.
- Fix EntityCategory import (from homeassistant.const)
- Fix ClimateEntityFeature and HVACMode imports (from climate.const)
- Add CoordinatorEntity generic type parameter for proper typing
- Add explicit coordinator attribute annotations
- Add sync method stubs for ClimateEntity abstract methods
- Replace pass with raise NotImplementedError in abstract methods
- Fix datetime handling in native_value property
- Add null checks for config_entry.data access
- Use public power_sensor_entity property instead of protected member
- Use getattr for optional model attributes
- Add force_update attribute to EffektGuardSensorEntityDescription
- Add device_class and force_update attributes to EffektGuardSwitchEntityDescription
- Fixes AttributeError when Home Assistant base entity classes access these required fields
- Fixes AttributeError when HA tries to substitute name placeholders
- Required by Home Assistant 2024.x+ entity naming system
- Revert to proper inheritance from HA base classes (SensorEntityDescription, SwitchEntityDescription)
- Remove unnecessary @DataClass decorators (parent classes are already dataclasses)
- Fix datetime import (was missing after previous changes)
- Fix EntityCategory import (import from homeassistant.const)
- Update pyrightconfig.json to suppress false positive type errors from HA metaclass
- Required for kw_only=True to properly extend frozen HA dataclasses
- Fixes TypeError: SensorEntityDescription.__init__() got unexpected keyword argument
- Runtime works correctly, Pylance errors are false positives from HA metaclass
- Redeclare all parent fields in entity descriptions for Pylance compatibility
- Fix UNDEFINED/UndefinedType imports (from homeassistant.helpers.entity)
- Remove pyrightconfig.json (not on main branch)
- Remove unused 'field' import from dataclasses

The parent classes use HA's special FrozenOrThawed metaclass which Pylance
can't analyze, so we redeclare all fields explicitly.
@enoch85 enoch85 changed the title Fix/import organization Fix anti-windup blocking and pyright/left errors Feb 4, 2026
@enoch85 enoch85 merged commit 93d4a66 into main Feb 4, 2026
2 checks passed
@enoch85 enoch85 deleted the fix/import-organization branch February 4, 2026 18:25
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