{"skill":{"slug":"home-assistant-bridge-python","displayName":"minos","summary":"Control Home Assistant devices, read sensors, and manage automations using the Python Bridge. Use when the user wants to interact with their smart home - tur...","description":"---\nname: home-assistant\ndescription: Control Home Assistant devices, read sensors, and manage automations using the Python Bridge. Use when the user wants to interact with their smart home - turning lights on/off, adjusting thermostats, reading sensor data, checking device states, or creating/modifying automations. Works with any Home Assistant instance accessible via REST API.\n---\n\n# Home Assistant Skill (Python Bridge)\n\nIntegration with Home Assistant via Python Bridge for reliable smart home control.\n\n## Prerequisites\n\n- Home Assistant instance running (local or remote)\n- Long-lived access token from HA profile\n- Network connectivity to HA instance\n- Python 3 with `requests` module\n\n## Configuration\n\n**One-time setup:**\n```bash\ncd /root/.openclaw/workspace/skills/home-assistant/scripts\n./ha-setup.sh\n```\n\nThis creates `~/.homeassistant.conf` with your HA_URL and HA_TOKEN.\n\n**Load configuration:**\n```bash\nsource ~/.homeassistant.conf\n```\n\n## Core Commands\n\nAll commands go through `ha-bridge.py`. Aliases are supported everywhere — use friendly names instead of entity IDs.\n\n### Device Control\n\n```bash\npython3 ha-bridge.py on <entity|alias>          # Turn on\npython3 ha-bridge.py off <entity|alias>         # Turn off\npython3 ha-bridge.py toggle <entity|alias>      # Toggle\npython3 ha-bridge.py on <entity> --verify       # Turn on + verify state after 3s\n```\n\n**Examples:**\n```bash\npython3 ha-bridge.py on kitchen                 # Alias → switch.kitchen_light_relay\npython3 ha-bridge.py off tv --verify            # Turn off + verify\npython3 ha-bridge.py toggle bedroom             # Toggle bedroom light\n```\n\n### Light Control\n\n```bash\npython3 ha-bridge.py light <entity|alias> --brightness <0-255>\npython3 ha-bridge.py light <entity|alias> --color-temp <mireds>\npython3 ha-bridge.py light <entity|alias> --rgb \"255,0,0\"\n```\n\n**Examples:**\n```bash\npython3 ha-bridge.py light bedroom --brightness 128\npython3 ha-bridge.py light kitchen --rgb \"255,200,100\"\n```\n\n### Climate Control\n\n```bash\npython3 ha-bridge.py climate <entity|alias> --temperature <value>\npython3 ha-bridge.py climate <entity|alias> --mode <heat|cool|auto|off>\n```\n\n### Scene Activation\n\n```bash\npython3 ha-bridge.py scene <scene_entity>\n```\n\n### Read States\n\n```bash\npython3 ha-bridge.py states                     # All entities (JSON)\npython3 ha-bridge.py state <entity|alias>       # Specific entity (JSON)\n```\n\n### Search Entities\n\n```bash\npython3 ha-bridge.py search <query>             # Search by name or entity_id\npython3 ha-bridge.py search licht               # Find all \"licht\" entities\npython3 ha-bridge.py search temp --domain sensor  # Only sensors matching \"temp\"\n```\n\n### History\n\n```bash\npython3 ha-bridge.py history <entity|alias>              # Last 24h\npython3 ha-bridge.py history kitchen --hours 48           # Last 48h\n```\n\n### Aliases\n\n```bash\npython3 ha-bridge.py aliases                    # Show all configured aliases\n```\n\nAliases are stored in `scripts/aliases.json`. Edit directly to add/change/remove.\n\n### Services\n\n```bash\npython3 ha-bridge.py services                   # List all available HA services\n```\n\n## Alias System\n\nAliases map friendly names to entity IDs. Stored in `scripts/aliases.json`:\n\n```json\n{\n  \"kitchen\": \"switch.kitchen_light_relay\",\n  \"bedroom\": \"light.bedroom_led_strip\",\n  \"thermostat\": \"climate.living_room\"\n}\n```\n\nUse aliases anywhere an entity ID is expected.\n\n## Aliases\n\nAliases are stored in `scripts/aliases.json`. Copy `scripts/aliases.example.json` as starting point:\n\n```bash\ncp scripts/aliases.example.json scripts/aliases.json\n```\n\nThen edit with your own device mappings. Use `python3 ha-bridge.py search <query>` to find entity IDs.\n\n## Status Delay Note\n\nHome Assistant needs 1-3 seconds to update state after a command. Use `--verify` to auto-check after 3 seconds.\n\n## File Structure\n\n```\nskills/home-assistant/\n├── SKILL.md                          # This file\n├── README.md                         # Human-readable docs\n├── scripts/\n│   ├── ha-bridge.py                  # Main bridge (all commands)\n│   ├── ha-setup.sh                   # One-time setup\n│   ├── aliases.json                  # Your alias mappings (create from example)\n│   └── aliases.example.json          # Example alias mappings\n└── references/\n    └── finding-entities.md           # How to find entity IDs\n```\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":707,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1773000679258,"updatedAt":1778491780967},"latestVersion":{"version":"1.0.0","createdAt":1773000679258,"changelog":"- Major update: Switched from bash CLI to Python Bridge for all Home Assistant control and automation.\n- New Python-based bridge script (ha-bridge.py) with comprehensive commands for device control, state queries, history, and scenes.\n- Alias system introduced: Use `aliases.json` to map friendly names to Home Assistant entity IDs.\n- One-time interactive setup script (`ha-setup.sh`) for configuration.\n- Documentation expanded: added concise usage guide in README.md and detailed reference on finding entity IDs.\n- Removed legacy bash scripts and outdated API reference.","license":"MIT-0"},"metadata":null,"owner":{"handle":"mischa-petschenig","userId":"s173jj8rwavybka7xrq69k6m5s884rpd","displayName":"Mischa-Petschenig","image":"https://avatars.githubusercontent.com/u/139151185?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089808146}}