v1.0.2: JWT Authentication Pro Compatibility
🐛 Bug Fixes
- JWT Authentication Pro compatibility - Full support for JWT Auth Pro plugin with token refresh mechanism
- Fixed token expiry detection - Now correctly parses JWT token expiry from the token itself (supports 180+ day tokens)
- Fixed 202 status handling - Properly handles HTTP 202 'Accepted' responses from JWT Auth Pro
- Added rate limiting support - Handles HTTP 429 responses with proper Retry-After delays
✨ Improvements
- Added retry logic - Automatic retries with exponential backoff for transient failures
- Improved token refresh - Better handling of refresh tokens with JWT Auth Pro format
- Reduced logging noise - Routine polling now uses debug level (quiet logs in production)
- Better error recovery - Clears stale tokens after 3 consecutive failures to force fresh authentication
🔧 Root Cause
The integration was defaulting to 1-hour token expiry when JWT Auth Pro doesn't return expires_in in the response. This caused unnecessary token refresh attempts every 55 minutes, leading to intermittent connected/disconnected status.
The fix parses the actual JWT token to extract the real expiry time from the exp claim.
📦 Installation
Update via HACS or manually replace the custom_components/ultra_card_pro_cloud folder.
⚠️ After Update
Users experiencing issues should:
- Remove the integration
- Restart Home Assistant
- Re-add the integration with their credentials