๐ Major Feature Release: v0.3.0
This release adds device control capabilities and intelligent entity discovery to the Pecron Home Assistant integration.
โจ New Features
๐๏ธ Controllable Switch Entities
- AC and DC outputs are now controllable switches (previously read-only)
- Turn power outputs on/off directly from Home Assistant
- Create automations to control outputs based on conditions (e.g., "turn off AC when battery < 20%")
- Enhanced error handling with persistent notifications
๐ง Advanced Control Service
- New
pecron.set_propertyservice for power users - Control any writable device property via automations or scripts
- Automatic TSL validation ensures only valid properties are modified
- Smart type conversion (handles boolean strings, numbers, etc.)
๐ TSL-Based Dynamic Discovery
- Integration now queries device capabilities automatically
- Only creates entities your device actually supports
- No more 'unavailable' entities cluttering your interface
- Automatically supports new device models without code changes
๐ Bug Fixes
- Fixed critical token refresh issue: Authentication errors during property fetching now properly trigger token refresh (not just during initial device fetch)
- Improved error detection for all auth error patterns (5032, token, 401, unauthorized, authentication)
- Case-insensitive error matching ensures reliable recovery
๐ Changes
- Breaking: AC and DC outputs moved from
binary_sensortoswitchplatform- Old entities will be removed, new switch entities will be created
- Update your automations to use the new switch entities
- Binary sensors now only include UPS Mode and Online status (read-only properties)
- Upgraded to unofficial-pecron-api v0.2.0
๐งช Developer Improvements
- Comprehensive test suite for token refresh (16 new tests)
- Improved test coverage overall (25 tests passing)
- Enhanced logging for diagnostics
๐ฆ Installation
Via HACS (Recommended)
- Open HACS โ Integrations
- Find "Pecron" and update to v0.3.0
- Restart Home Assistant
Manual Installation
- Download the latest release
- Copy
custom_components/pecronto your HA config directory - Restart Home Assistant
Full Changelog: https://github.com/jsight/ha-pecron/blob/main/CHANGELOG.md