What problem does it solve? Integrating external applications with Home Assistant requires navigating authentication tokens, REST endpoint schemas, and WebSocket handshake lifecycles, where small mistakes like a missing Bearer prefix or a missed auth_required response cause silent failures and cryptic 401 or 404 errors. ## Core Features & Use Cases - REST API Integration: Query and update entity states, call services, fire events, retrieve history, and render templates through documented HTTP endpoints. - WebSocket Real-Time Communication: Establish persistent connections with proper auth handshake handling, subscribe to state_changed events, and call services with low latency. - Error Handling Patterns: Diagnose and recover from common failures including 401 token errors, 404 missing entities, 502 unavailable servers, and WebSocket auth timeouts. - Use Case: You are writing a Python script that turns on lights when your CI build fails. Use this Skill to set up a Long-Lived Access Token, call the light/turn_on service via the REST API, and subscribe to sensor events over WebSocket for real-time monitoring. ## Quick Start Ask the AI to write a Python script that authenticates with your Home Assistant instance and calls a service to turn on a specific light entity.