home-assistant-manager
Expert-level Home Assistant configuration management with efficient deployment workflows (git and rapid scp iteration), remote CLI access via SSH and hass-cli, automation verification protocols, log analysis, reload vs restart optimization, and comprehensive Lovelace dashboard management for tablet-optimized UIs. Includes template patterns, card types, debugging strategies, and real-world examples.
What this skill does
# Home Assistant Manager Expert-level Home Assistant configuration management with efficient workflows, remote CLI access, and verification protocols. ## Core Capabilities - Remote Home Assistant instance management via SSH and hass-cli - Smart deployment workflows (git-based and rapid iteration) - Configuration validation and safety checks - Automation testing and verification - Log analysis and error detection - Reload vs restart optimization - Lovelace dashboard development and optimization - Template syntax patterns and debugging - Tablet-optimized UI design ## Prerequisites Before starting, verify the environment has: 1. SSH access to Home Assistant instance (`[email protected]`) 2. `hass-cli` installed locally 3. Environment variables loaded (HASS_SERVER, HASS_TOKEN) 4. Git repository connected to HA `/config` directory 5. Context7 MCP server with Home Assistant docs (recommended) ## Remote Access Patterns ### Using hass-cli (Local, via REST API) All `hass-cli` commands use environment variables automatically: ```bash # List entities hass-cli state list # Get specific state hass-cli state get sensor.entity_name # Call services hass-cli service call automation.reload hass-cli service call automation.trigger --arguments entity_id=automation.name ``` ### Using SSH for HA CLI ```bash # Check configuration validity ssh [email protected] "ha core check" # Restart Home Assistant ssh [email protected] "ha core restart" # View logs ssh [email protected] "ha core logs" # Tail logs with grep ssh [email protected] "ha core logs | grep -i error | tail -20" ``` ## Deployment Workflows ### Standard Git Workflow (Final Changes) Use for changes you want in version control: ```bash # 1. Make changes locally # 2. Check validity ssh [email protected] "ha core check" # 3. Commit and push git add file.yaml git commit -m "Description" git push # 4. CRITICAL: Pull to HA instance ssh [email protected] "cd /config && git pull" # 5. Reload or restart hass-cli service call automation.reload # if reload sufficient # OR ssh [email protected] "ha core restart" # if restart needed # 6. Verify hass-cli state get sensor.new_entity ssh [email protected] "ha core logs | grep -i error | tail -20" ``` ### Rapid Development Workflow (Testing/Iteration) Use `scp` for quick testing before committing: ```bash # 1. Make changes locally # 2. Quick deploy scp automations.yaml [email protected]:/config/ # 3. Reload/restart hass-cli service call automation.reload # 4. Test and iterate (repeat 1-3 as needed) # 5. Once finalized, commit to git git add automations.yaml git commit -m "Final tested changes" git push ``` **When to use scp:** - ๐ Rapid iteration and testing - ๐ Frequent small adjustments - ๐งช Experimental changes - ๐จ UI/Dashboard work **When to use git:** - โ Final tested changes - ๐ฆ Version control tracking - ๐ Important configs - ๐ฅ Changes to document ## Reload vs Restart Decision Making **ALWAYS assess if reload is sufficient before requiring a full restart.** ### Can be reloaded (fast, preferred): - โ Automations: `hass-cli service call automation.reload` - โ Scripts: `hass-cli service call script.reload` - โ Scenes: `hass-cli service call scene.reload` - โ Template entities: `hass-cli service call template.reload` - โ Groups: `hass-cli service call group.reload` - โ Themes: `hass-cli service call frontend.reload_themes` ### Require full restart: - โ Min/Max sensors and platform-based sensors - โ New integrations in configuration.yaml - โ Core configuration changes - โ MQTT sensor/binary_sensor platforms ## Automation Verification Workflow **ALWAYS verify automations after deployment:** ### Step 1: Deploy ```bash git add automations.yaml && git commit -m "..." && git push ssh [email protected] "cd /config && git pull" ``` ### Step 2: Check Configuration ```bash ssh [email protected] "ha core check" ``` ### Step 3: Reload ```bash hass-cli service call automation.reload ``` ### Step 4: Manually Trigger ```bash hass-cli service call automation.trigger --arguments entity_id=automation.name ``` **Why trigger manually?** - Instant feedback (don't wait for scheduled triggers) - Verify logic before production - Catch errors immediately ### Step 5: Check Logs ```bash sleep 3 ssh [email protected] "ha core logs | grep -i 'automation_name' | tail -20" ``` **Success indicators:** - `Initialized trigger AutomationName` - `Running automation actions` - `Executing step ...` - No ERROR or WARNING messages **Error indicators:** - `Error executing script` - `Invalid data for call_service` - `TypeError`, `Template variable warning` ### Step 6: Verify Outcome **For notifications:** - Ask user if they received it - Check logs for mobile_app messages **For device control:** ```bash hass-cli state get switch.device_name ``` **For sensors:** ```bash hass-cli state get sensor.new_sensor ``` ### Step 7: Fix and Re-test if Needed If errors found: 1. Identify root cause from error messages 2. Fix the issue 3. Re-deploy (steps 1-2) 4. Re-verify (steps 3-6) ## Dashboard Management ### Dashboard Fundamentals **What are Lovelace Dashboards?** - JSON files in `.storage/` directory (e.g., `.storage/lovelace.control_center`) - UI configuration for Home Assistant frontend - Optimizable for different devices (mobile, tablet, wall panels) **Critical Understanding:** - Creating dashboard file is NOT enough - must register in `.storage/lovelace_dashboards` - Dashboard changes don't require HA restart (just browser refresh) - Use panel view for full-screen content (maps, cameras) - Use sections view for organized multi-card layouts ### Dashboard Development Workflow **Rapid Iteration with scp (Recommended for dashboards):** ```bash # 1. Make changes locally vim .storage/lovelace.control_center # 2. Deploy immediately (no git commit yet) scp .storage/lovelace.control_center [email protected]:/config/.storage/ # 3. Refresh browser (Ctrl+F5 or Cmd+Shift+R) # No HA restart needed! # 4. Iterate: Repeat 1-3 until perfect # 5. Commit when stable git add .storage/lovelace.control_center git commit -m "Update dashboard layout" git push ssh [email protected] "cd /config && git pull" ``` **Why scp for dashboards:** - Instant feedback (no HA restart) - Iterate quickly on visual changes - Commit only stable versions ### Creating New Dashboard **Complete workflow:** ```bash # Step 1: Create dashboard file cp .storage/lovelace.my_home .storage/lovelace.new_dashboard # Step 2: Register in lovelace_dashboards # Edit .storage/lovelace_dashboards to add: { "id": "new_dashboard", "show_in_sidebar": true, "icon": "mdi:tablet-dashboard", "title": "New Dashboard", "require_admin": false, "mode": "storage", "url_path": "new-dashboard" } # Step 3: Deploy both files scp .storage/lovelace.new_dashboard [email protected]:/config/.storage/ scp .storage/lovelace_dashboards [email protected]:/config/.storage/ # Step 4: Restart HA (required for registry changes) ssh [email protected] "ha core restart" sleep 30 # Step 5: Verify appears in sidebar ``` **Update .gitignore to track:** ```gitignore # Exclude .storage/ by default .storage/ # Include dashboard files !.storage/lovelace.new_dashboard !.storage/lovelace_dashboards ``` ### View Types Decision Matrix **Use Panel View when:** - Displaying full-screen map (vacuum, cameras) - Single large card needs full width - Want zero margins/padding - Minimize scrolling **Use Sections View when:** - Organizing multiple cards - Need responsive grid layout - Building multi-section dashboards **Layout Example:** ```json // Panel view - full width, no margins { "type": "panel", "title": "Vacuum Map", "path": "map", "cards": [ { "type": "custom:xiaomi-vacuum-map-card", "entity": "vacuum.dusty" } ] } // Sections view - organized, has ~10% margins { "type": "s
Related in Data & Analytics
clawarr-suite
IncludedComprehensive management for self-hosted media stacks (Sonarr, Radarr, Lidarr, Readarr, Prowlarr, Bazarr, Overseerr, Plex, Tautulli, SABnzbd, Recyclarr, Unpackerr, Notifiarr, Maintainerr, Kometa, FlareSolverr). Deep library exploration, analytics, dashboard generation, content management, request handling, subtitle management, indexer control, download monitoring, quality profile sync, library cleanup automation, notification routing, collection/overlay management, and media tracker integration (Trakt, Letterboxd, Simkl).
querying-soql
IncludedSOQL query generation, optimization, and analysis with 100-point scoring. Use this skill when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan analysis, and performance or safety improvements for Salesforce queries. TRIGGER when: user writes, optimizes, or debugs SOQL/SOSL queries, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER when: bulk data operations (use handling-sf-data), Apex DML logic (use generating-apex), or report/dashboard queries.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
habit-flow
IncludedAI-powered atomic habit tracker with natural language logging, streak tracking, smart reminders, and coaching. Use for creating habits, logging completions naturally ("I meditated today"), viewing progress, and getting personalized coaching.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
visualizing-data
IncludedBuilds dashboards, reports, and data-driven interfaces requiring charts, graphs, or visual analytics. Provides systematic framework for selecting appropriate visualizations based on data characteristics and analytical purpose. Includes 24+ visualization types organized by purpose (trends, comparisons, distributions, relationships, flows, hierarchies, geospatial), accessibility patterns (WCAG 2.1 AA compliance), colorblind-safe palettes, and performance optimization strategies. Use when creating visualizations, choosing chart types, displaying data graphically, or designing data interfaces.