github jsight/ha-pecron v0.3.0
v0.3.0: Control Features and Dynamic Discovery

latest releases: v0.5.0, v0.4.1, v0.4.0...
3 months ago

๐ŸŽ‰ 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_property service 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_sensor to switch platform
    • 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)

  1. Open HACS โ†’ Integrations
  2. Find "Pecron" and update to v0.3.0
  3. Restart Home Assistant

Manual Installation

  1. Download the latest release
  2. Copy custom_components/pecron to your HA config directory
  3. Restart Home Assistant

Full Changelog: https://github.com/jsight/ha-pecron/blob/main/CHANGELOG.md

Don't miss a new ha-pecron release

NewReleases is sending notifications on new releases.