Skip to content

Commit c2cff81

Browse files
author
jsightler
committed
Update beads: close v0.3.0 release
1 parent 4777bf2 commit c2cff81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.beads/issues.jsonl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{"id":"ha-pecron-1k6","title":"Fix token refresh not triggering on property fetch failure","description":"The automatic token refresh logic doesn't trigger when authentication fails during get_device_properties() calls.\n\n## Problem\nError: 'API error 5032: Token validation failed' during property fetching doesn't trigger token refresh.\n\nThe token refresh logic in _async_update_data() only catches exceptions that bubble up from _fetch_data(). However, authentication errors during the per-device property fetching loop (line 223) are caught by the generic exception handler (line 246-253) and just logged, so they never reach the retry logic.\n\n## Current Behavior\n- Token expires during property fetch\n- Error is logged but integration continues with no data\n- Next update attempt uses same expired token\n- User sees persistent errors until manual reload\n\n## Expected Behavior\n- Token expiration detected during property fetch\n- API reset to force re-login\n- Property fetch retried with fresh token\n- Integration recovers automatically\n\n## Solution\nMove the authentication error detection into _fetch_data() so it can:\n1. Detect 5032 errors during property fetching\n2. Reset self.api = None to force re-login\n3. Raise the exception to trigger retry in _async_update_data()\n\nOR: Move the per-device property fetching into _async_update_data() where the retry logic exists.\n\n## Location\nFile: custom_components/pecron/__init__.py\nLines: 220-253 (property fetching loop)\nRelated: 140-184 (retry logic that needs to catch these errors)\n\n## Test Case\n1. Wait for token to expire (~24 hours)\n2. Observe error 5032 during property fetch\n3. Verify auto-recovery happens on next update cycle","status":"closed","priority":0,"issue_type":"bug","owner":"jsightler@example.com","created_at":"2026-02-14T10:59:24.476365964-05:00","created_by":"jsightler","updated_at":"2026-02-14T11:00:42.121184515-05:00","closed_at":"2026-02-14T11:00:42.121184515-05:00","close_reason":"Closed"}
22
{"id":"ha-pecron-1l6","title":"Create GitHub repository and configure","description":"Create the GitHub repo at github.com/jsightler/ha-pecron, configure branch protection rules, and add GitHub settings","status":"closed","priority":2,"issue_type":"task","owner":"jesse.sightler@gmail.com","created_at":"2026-02-09T23:05:39.899470665-05:00","created_by":"Jesse Sightler","updated_at":"2026-02-09T23:10:51.143776359-05:00","closed_at":"2026-02-09T23:10:51.143776359-05:00","close_reason":"Closed"}
3-
{"id":"ha-pecron-2v4","title":"Release v0.3.0: Control features and dynamic discovery","description":"Release version 0.3.0 with major new features leveraging unofficial-pecron-api v0.2.0.\n\n## What's New in v0.3.0\n\n### Control Features\n- **Controllable Switches**: AC and DC outputs are now controllable switch entities (previously read-only binary sensors)\n- **Advanced Service**: New pecron.set_property service for controlling any writable device property\n- Users can now create automations to control power outputs\n\n### Dynamic Discovery\n- **TSL-Based Entity Creation**: Integration now queries device TSL to discover capabilities\n- Only creates entities for properties the device actually supports\n- No more 'unavailable' entities for unsupported features\n- Automatically supports new device models\n\n### Foundation Improvements\n- Upgraded to unofficial-pecron-api v0.2.0\n- Enhanced error handling with persistent notifications\n- Improved logging for diagnostics\n\n## Release Checklist\n\n1. Update manifest.json version: 0.2.5 → 0.3.0\n2. Create CHANGELOG.md entry or update existing changelog\n3. Run any tests if available\n4. Create git tag: v0.3.0\n5. Create GitHub release with release notes\n6. Update README.md if needed (document new service)\n\n## Commits Included\n- Upgrade unofficial-pecron-api from v0.1.0 to v0.2.0\n- Add controllable switch entities for AC and DC outputs\n- Add TSL-based dynamic property discovery\n- Add pecron.set_property service for advanced control","status":"in_progress","priority":1,"issue_type":"task","owner":"jsightler@example.com","created_at":"2026-02-14T02:22:42.799299883-05:00","created_by":"jsightler","updated_at":"2026-02-14T11:09:02.810066603-05:00"}
3+
{"id":"ha-pecron-2v4","title":"Release v0.3.0: Control features and dynamic discovery","description":"Release version 0.3.0 with major new features leveraging unofficial-pecron-api v0.2.0.\n\n## What's New in v0.3.0\n\n### Control Features\n- **Controllable Switches**: AC and DC outputs are now controllable switch entities (previously read-only binary sensors)\n- **Advanced Service**: New pecron.set_property service for controlling any writable device property\n- Users can now create automations to control power outputs\n\n### Dynamic Discovery\n- **TSL-Based Entity Creation**: Integration now queries device TSL to discover capabilities\n- Only creates entities for properties the device actually supports\n- No more 'unavailable' entities for unsupported features\n- Automatically supports new device models\n\n### Foundation Improvements\n- Upgraded to unofficial-pecron-api v0.2.0\n- Enhanced error handling with persistent notifications\n- Improved logging for diagnostics\n\n## Release Checklist\n\n1. Update manifest.json version: 0.2.5 → 0.3.0\n2. Create CHANGELOG.md entry or update existing changelog\n3. Run any tests if available\n4. Create git tag: v0.3.0\n5. Create GitHub release with release notes\n6. Update README.md if needed (document new service)\n\n## Commits Included\n- Upgrade unofficial-pecron-api from v0.1.0 to v0.2.0\n- Add controllable switch entities for AC and DC outputs\n- Add TSL-based dynamic property discovery\n- Add pecron.set_property service for advanced control","status":"closed","priority":1,"issue_type":"task","owner":"jsightler@example.com","created_at":"2026-02-14T02:22:42.799299883-05:00","created_by":"jsightler","updated_at":"2026-02-14T11:17:28.334049733-05:00","closed_at":"2026-02-14T11:17:28.334049733-05:00","close_reason":"Closed"}
44
{"id":"ha-pecron-4l0","title":"Add GitHub Actions CI/CD pipeline","description":"Create .github/workflows for testing, linting, and validation (ruff, type checking, Home Assistant manifest validation)","status":"closed","priority":2,"issue_type":"task","owner":"jesse.sightler@gmail.com","created_at":"2026-02-09T23:05:40.108617092-05:00","created_by":"Jesse Sightler","updated_at":"2026-02-09T23:16:32.59134597-05:00","closed_at":"2026-02-09T23:16:32.59134597-05:00","close_reason":"Closed"}
55
{"id":"ha-pecron-7re","title":"Verify unofficial-pecron-api property names match expectations","description":"The sensor entities expect specific property names (battery_percentage, total_input_power, etc.) but we should verify these match what the unofficial-pecron-api actually returns. If the API uses different names (e.g., batteryPercentage, battery_pct), the sensors will show no data. Add test/debug code to log actual property structure and validate mapping.","status":"closed","priority":1,"issue_type":"task","owner":"jsightler@example.com","created_at":"2026-02-10T00:08:29.205789331-05:00","created_by":"jsightler","updated_at":"2026-02-10T00:13:10.342365446-05:00","closed_at":"2026-02-10T00:13:10.342365446-05:00","close_reason":"Added debug logging for available property attributes in coordinator and validation warnings in sensor entities when expected properties are missing."}
66
{"id":"ha-pecron-7z8","title":"Add TSL-based dynamic property discovery","description":"Use the new get_product_tsl() API to discover what properties each device actually supports, rather than hard-coding a fixed set of sensors.\n\nBackground:\nDifferent Pecron models have different capabilities. The TSL (Thing Specification Language) describes what each device supports. With v0.2.0, we can query this and create entities dynamically.\n\nCurrent approach:\n- Hard-coded list of sensors in SENSOR_DESCRIPTIONS\n- May show sensors for properties the device doesn't have\n- May miss new properties added to devices\n\nNew approach:\n- During setup, call api.get_product_tsl(device)\n- Parse TslProperty list to find what's available\n- Create sensor entities only for properties the device actually has\n- Potentially create switches for writable boolean properties automatically\n- Store TSL in coordinator.data for reference\n\nImplementation:\n1. Add tsl field to coordinator data structure\n2. Fetch TSL during initial device discovery in _fetch_data()\n3. In sensor.py async_setup_entry, filter SENSOR_DESCRIPTIONS by what TSL reports\n4. Consider creating generic sensors for TSL properties not in our description list\n5. Log discovered writable properties for future control features\n\nBenefits:\n- No 'unavailable' entities for unsupported properties\n- Automatically support new device models\n- Foundation for advanced control features\n- Better user experience (only relevant entities shown)\n\nChallenges:\n- Need to map TSL property codes to our sensor descriptions\n- Handle devices with varying capabilities\n- Ensure entities don't disappear if TSL query fails (graceful fallback)\n\nDependencies:\n- Blocks on: API v0.2.0 upgrade (ha-pecron-dxo)\n\nNice-to-have:\n- Could be combined with switch entity work to auto-create switches for writable bool properties","status":"closed","priority":2,"issue_type":"feature","owner":"jsightler@example.com","created_at":"2026-02-14T01:48:56.021515366-05:00","created_by":"jsightler","updated_at":"2026-02-14T02:19:13.68821791-05:00","closed_at":"2026-02-14T02:19:13.68821791-05:00","close_reason":"Closed","dependencies":[{"issue_id":"ha-pecron-7z8","depends_on_id":"ha-pecron-dxo","type":"blocks","created_at":"2026-02-14T01:56:47.595206223-05:00","created_by":"jsightler"}]}

0 commit comments

Comments
 (0)