Skip to content

v0.4.0

Choose a tag to compare

@eXPerience83 eXPerience83 released this 04 Nov 06:01
0c2b262

What’s changed in v0.4.0

🚀 Highlights

  • Native preset modes (home, away, sleep) in climate; legacy select.scenary removed.
  • Unified offline detection: fixed 10-minute staleness + 90-second debounce for notifications.
  • Centralized optimistic overlay + numeric clamping for consistent post-write UX across entities.
  • Tooling updated to Python 3.14 (format/lint) with Black/Ruff targeting py314.

🔁 Breaking changes

  • Drop select.scenary → use climate.set_preset_mode (home/away/sleep) in automations.
  • No migration paths: tokens live in entry.options['user_token']; entry.data keeps only the username.
  • Options/UI: removed stale_after_minutes; scan_interval constrained to 10–30 s (default 10 s) and clamped at runtime.

✨ New & Behavior

  • Fan modes normalized to low / medium / high when availables_speeds == 3 (no change for other counts).

🐛 Bug fixes

  • Coordinator helper and binary sensors now share the same 10-minute offline threshold.
  • Number writes use the required {"device": ...} envelope for /devices/<id>.
  • Sensors: avoid Python 3.11 types.UnionType with isinstance() so machine_errors never raises TypeError (rendered as CSV strings).
  • Options flow merges without dropping hidden keys (notably user_token).
  • Reauth flow reliably finds the target entry even without entry_id in context.
  • Prevent rare 500s in config_flow by avoiding hard imports at import time.
  • Climate presets write via the canonical api.put_device_fields(device_id, {"device":{"scenary":...}}) and keep/invalidate optimistic state as needed.
  • Cancel async_call_later handles on unload; clean imports after removing stale_after_minutes.

♻️ Refactors

  • Device Registry: pass connections through the DeviceInfo constructor (CONNECTION_NETWORK_MAC), and return a proper DeviceInfo object.
  • Centralized optimistic TTLs & clamping in helpers.py and shared refresh scheduling for climate/number/switch.

🌐 UX / i18n

  • Localized 422 control errors and connectivity notifications (EN/ES).
  • Translation keys aligned with Hassfest buckets (exceptions / issues).

🧰 Tooling / CI

  • Development floor: Python 3.14; Black/Ruff target py314.

🔒 Security & Privacy

  • Passwords are never persisted; cleared from memory immediately after login/reauth.
  • Clarified that we do not promise encryption at rest for config_entries; token is kept in Options to reduce churn and separate identity from credentials.

🧪 Diagnostics

  • New diagnostic sensor: fan_modes_normalized (True/False) to indicate UI label normalization.

📚 Docs

  • README updated: remove select.scenary, highlight native presets, and document the offline threshold/debounce.
  • info.md: clarified that device field updates (e.g., sleep_time, unoccupied limits) must be sent inside {"device": {...}}.

⚙️ Compatibility notes

  • Exposed HVAC modes by default: COOL, HEAT, FAN_ONLY, DRY.
  • HEAT_COOL/AUTO remains opt-in and device-dependent (experimental).

Pulls

Full Changelog: v0.3.15...v0.4.0