- Add test_ha_connection() function to validate API access at startup
- Improve error logging with response body details
- Add debug logs showing exact API endpoints being called
- Capture stderr from curl to catch connection errors
- Replace incorrect 'target' parameter with 'entity_id' in API requests
- Add domain detection to handle different entity types (light, switch, etc.)
- Implement smart service routing based on entity domain
- Improve logging to show which service is being called