v1.0.1 - Critical Fix: Resilient API Error Handling
🔧 Critical Bug Fix Release
This patch release fixes a critical issue where the integration would fail to load when BFT's cloud API returns temporary errors.
🐛 What Was Fixed
Problem: Integration failed to load when BFT API's diagnosis endpoint returned HTTP 500 errors or network issues
Solution: Graceful error handling that allows integration to load and auto-recover
✨ Changes in v1.0.1
- Resilient error handling: Integration now gracefully handles temporary API failures (HTTP 500, SSL errors, connection issues)
- Auto-recovery: Entity shows as "unavailable" during API issues and automatically becomes available when service recovers
- Better logging: Improved error messages that clarify the integration will retry automatically
- No more setup failures: Integration loads successfully even when BFT cloud service is temporarily down
📝 Technical Details
Changed behavior in _get_command() method for diagnosis calls:
- HTTP 500 errors → Return empty dict (was: raise exception)
- SSL errors → Return empty dict (was: raise exception)
- Connection errors → Return empty dict (was: raise exception)
- Request errors → Return empty dict (was: raise exception)
The update() method already handled empty responses gracefully, so the integration:
- Loads successfully during Home Assistant startup
- Shows entity as "unavailable" if API is down
- Automatically recovers when API responds (polling every 5 seconds)
🚀 Upgrading from v1.0.0
HACS users:
- Go to HACS → Integrations
- Find "BFT Gate Automation"
- Click "Update"
- Restart Home Assistant
Manual installation:
- Download
homeassistant-bft-v1.0.1.zipbelow - Extract to
custom_components/bft/ - Restart Home Assistant
📋 Recommended Configuration
For best reliability with the sometimes-unreliable BFT API:
cover:
- platform: bft
covers:
your_gate:
device: YOUR_DEVICE_NAME
username: your_email@example.com
password: your_password
name: your_gate_name
skip_initial_update: true # Faster startup
timeout: 30 # Longer timeout for slow API
retry_count: 10 # More retries for reliability🔗 Links
🙏 Feedback
If you encounter any issues, please open an issue.