homeassistant-cli
Advanced Home Assistant control using the official hass-cli tool. Features auto-completion, event monitoring, history queries, and rich output formatting. Alternative to the curl-based homeassistant skill - choose this if you want a more interactive CLI experience with better discovery and formatting.
What this skill does
# Home Assistant CLI Control your Home Assistant smart home devices using the **official hass-cli tool** — a feature-rich command-line interface with auto-completion, event monitoring, and flexible output formatting. ## Why This Skill vs. `homeassistant` (curl-based)? **Choose `homeassistant-cli` if you want:** - ✅ **Auto-completion** for entity IDs and services (bash/zsh/fish) - ✅ **Event monitoring** in real-time (`hass-cli event watch`) - ✅ **History queries** (`hass-cli state history`) - ✅ **Better output formatting** (table/YAML/JSON with one flag) - ✅ **Interactive exploration** (easier to discover entities and services) - ✅ **Comprehensive documentation** with examples and troubleshooting **Choose `homeassistant` (curl) if you want:** - ✅ Zero dependencies (curl + jq are pre-installed) - ✅ Lightweight and fast - ✅ Better for scripting and automation - ✅ No Python requirements Both work great — this skill is for users who interact frequently with Home Assistant and want a richer CLI experience. ## Setup Before using hass-cli, configure authentication: 1. Generate a long-lived access token in Home Assistant: - Navigate to your profile: `https://your-homeassistant:8123/profile` - Scroll to "Long-Lived Access Tokens" - Create a new token 2. Set environment variables (add to shell config for persistence): ```bash export HASS_SERVER=https://homeassistant.local:8123 export HASS_TOKEN=<your-token> ``` 3. Test connection: ```bash hass-cli info ``` ## Common Commands ### List Entities ```bash # List all entities hass-cli state list # Filter by domain hass-cli state list light hass-cli state list switch hass-cli state list sensor # Get specific entity state hass-cli state get light.living_room ``` ### Control Devices ```bash # Turn on/off lights hass-cli service call light.turn_on --arguments entity_id=light.living_room hass-cli service call light.turn_off --arguments entity_id=light.living_room # Set brightness (0-255) hass-cli service call light.turn_on --arguments entity_id=light.bedroom,brightness=128 # Turn on/off switches hass-cli service call switch.turn_on --arguments entity_id=switch.fan hass-cli service call switch.turn_off --arguments entity_id=switch.fan # Toggle any device hass-cli service call homeassistant.toggle --arguments entity_id=light.kitchen ``` ### List and Call Services ```bash # List all services hass-cli service list # Filter services hass-cli service list light hass-cli service list 'home.*toggle' # Get service details (YAML output) hass-cli -o yaml service list homeassistant.toggle ``` ### Work with Scenes ```bash # List scenes hass-cli state list scene # Activate a scene hass-cli service call scene.turn_on --arguments entity_id=scene.movie_time ``` ### Monitor Events ```bash # Watch all events hass-cli event watch # Watch specific event type hass-cli event watch state_changed hass-cli event watch automation_triggered ``` ### History ```bash # Get state history (last 50 minutes) hass-cli state history --since 50m light.living_room # Multiple entities hass-cli state history --since 1h light.living_room switch.fan ``` ## Output Formats Control output with `-o` or `--output`: ```bash # Table (default) hass-cli state list # YAML hass-cli -o yaml state get light.living_room # JSON hass-cli -o json state list light # No headers (for scripting) hass-cli --no-headers state list ``` ## Tips - **Entity discovery**: Use `hass-cli state list` to find entity IDs - **Service discovery**: Use `hass-cli service list` to find available services - **Auto-completion**: See [references/autocomplete.md](references/autocomplete.md) for shell setup - **Troubleshooting**: See [references/troubleshooting.md](references/troubleshooting.md) ## Examples See [references/examples.md](references/examples.md) for common automation patterns and use cases.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.