Skip to content

Migrate to pyvesync 3.4.2 and Python 3.14#77

Open
mxr wants to merge 5 commits into
haext:mainfrom
mxr:py314
Open

Migrate to pyvesync 3.4.2 and Python 3.14#77
mxr wants to merge 5 commits into
haext:mainfrom
mxr:py314

Conversation

@mxr

@mxr mxr commented Jun 29, 2026

Copy link
Copy Markdown

Changes

  • Upgrade pyvesync from 2.1.x to 3.4.2
  • Rebuild venv with Python 3.14; update homeassistant dev dep and hacs.json minimum to 2025.11.0 (first release to declare Python 3.14 support)
  • Update pre-commit hooks: pyupgrade v3.21.2 with --py314-plus, black 25.1.0, isort 5.13.2
  • All pyvesync calls are now awaited (login, update, turn_on/off, set_*, etc.)
  • Device state accessed via device.state.* instead of device.details[...] / device.config[...] dicts
  • Device routing uses typed manager.devices container properties (.air_purifiers, .fans, .humidifiers, .air_fryers, etc.) instead of manager.fans / manager.kitchen
  • has_feature() rewritten to check device.state attributes for "details"/"config" keys and device capability lists for "_config_dict" keys
  • Removed VS_FAN_TYPES, VS_HUMIDIFIERS_TYPES, VS_AIRFRYER_TYPES from const.py (device type detection now handled by the typed device container)
  • All HA entity action methods converted to async variants (async_turn_on/off, async_set_percentage, async_set_preset_mode, async_set_native_value, async_press)
  • Night light entity uses device.supports_nightlight property and device.state.nightlight_* attributes
  • Air fryer sensor/binary detection uses hasattr(dev.state, "cook_set_temp") instead of hasattr(dev, "fryer_status")
  • Air quality attribute renamed: air_quality -> air_quality_level, air_quality_value -> pm25

mxr added 5 commits June 29, 2026 07:57
- Upgrade pyvesync from 2.1.x to 3.4.2 (sync->async API, new device
  container model, state object per device)
- Rebuild venv with Python 3.14
- Update homeassistant dev dep to 2026.6.4
- Update pre-commit hooks for Python 3.14 compatibility
- All pyvesync calls are now awaited (login, update, turn_on/off, etc.)
- Device state accessed via device.state.* instead of device.details/config dicts
- Device routing uses manager.devices.air_purifiers/fans/humidifiers/air_fryers
  instead of manager.fans/kitchen (which split purifiers from humidifiers)
- Remove VS_FAN_TYPES/VS_HUMIDIFIERS_TYPES/VS_AIRFRYER_TYPES from const
- HA entity methods converted to async_turn_on/off, async_set_*, async_press
- pyupgrade: v3.19.1 -> v3.21.2, args --py313-plus -> --py314-plus
- requirements_dev.txt, hacs.json: homeassistant -> 2025.11.0
  (first HA release to declare Python 3.14 support)
- Reorder config_flow.py: VeSyncOptionsFlowHandler before VeSyncFlowHandler
  to fix F821 forward reference now that pyupgrade removes annotation quotes
@mxr mxr marked this pull request as ready for review July 9, 2026 18:50
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