v0.4.0
What’s changed in v0.4.0
🚀 Highlights
- Native preset modes (
home,away,sleep) inclimate; legacyselect.scenaryremoved. - 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→ useclimate.set_preset_mode(home/away/sleep) in automations. - No migration paths: tokens live in
entry.options['user_token'];entry.datakeeps only the username. - Options/UI: removed
stale_after_minutes;scan_intervalconstrained to 10–30 s (default 10 s) and clamped at runtime.
✨ New & Behavior
- Fan modes normalized to
low / medium / highwhenavailables_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.UnionTypewithisinstance()somachine_errorsnever raisesTypeError(rendered as CSV strings). - Options flow merges without dropping hidden keys (notably
user_token). - Reauth flow reliably finds the target entry even without
entry_idin context. - Prevent rare 500s in
config_flowby 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_laterhandles on unload; clean imports after removingstale_after_minutes.
♻️ Refactors
- Device Registry: pass
connectionsthrough theDeviceInfoconstructor (CONNECTION_NETWORK_MAC), and return a properDeviceInfoobject. - Centralized optimistic TTLs & clamping in
helpers.pyand 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
- Fan&presets by @eXPerience83 in #10
- Refactor: centralize optimistic overlay helpers by @eXPerience83 in #11
- Align offline threshold constant and purge API passwords by @eXPerience83 in #12
- Document connectivity threshold and API payload fixes by @eXPerience83 in #13
- Fix machine_errors isinstance handling for Python 3.14 by @eXPerience83 in #14
- Optimistic by @eXPerience83 in #15
Full Changelog: v0.3.15...v0.4.0