{"id":27255587,"url":"https://github.com/mawalu/homeassistant-cli","last_synced_at":"2025-04-11T02:20:16.669Z","repository":{"id":50082690,"uuid":"104348100","full_name":"mawalu/homeassistant-cli","owner":"mawalu","description":"Control your smart home from the terminal","archived":false,"fork":false,"pushed_at":"2021-06-04T20:53:47.000Z","size":17,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-14T13:13:21.847Z","etag":null,"topics":["cli","home-assistant","home-automation","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mawalu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-21T12:56:31.000Z","updated_at":"2022-08-15T22:22:15.000Z","dependencies_parsed_at":"2022-09-04T13:51:03.209Z","dependency_job_id":null,"html_url":"https://github.com/mawalu/homeassistant-cli","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mawalu%2Fhomeassistant-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mawalu%2Fhomeassistant-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mawalu%2Fhomeassistant-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mawalu%2Fhomeassistant-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mawalu","download_url":"https://codeload.github.com/mawalu/homeassistant-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328341,"owners_count":21085298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","home-assistant","home-automation","nodejs"],"created_at":"2025-04-11T02:20:15.605Z","updated_at":"2025-04-11T02:20:16.646Z","avatar_url":"https://github.com/mawalu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# homeassistant-cli\n\nA simple cli tool for [Home Assistant](https://home-assistant.io/) that uses [node-homeassistant](https://github.com/Mawalu/node-homeassistant).\n\n## Installation\n\n```shell\n$ npm install -g homeassistant-cli\n```\n\nIf there is an permission error you have to reconfigure npm or use sudo\n\n## Usage\n\nCall a service\n\n```shell\n$ hac call light turn_on\n```\n\nAdd additional service data\n\n```shell\n$ hac call light turn_on --service-data '{\"entity_id\": \"light.komode\"}'\n```\n\nQuery the state\n\n```shell\n$ hac state sun.sun\n```\n\nSubscribe to state changes\n\n```shell\n$ hac state -s sun.sun\n```\n\n## Additional parameters\n\nCustom hostname, port and password\n\n```shell\n$ hac --ip 10.1.0.166 --port 80 --api-password \"hunter4\" state sun.sun\n```\n\nTo find shorthands and some extra parameters use\n\n```shell\n$ hac --help\n```\n\n## Scripting example\n\nYou can use this to access Home Assistant from your scripts\n\n```bash\n#!/bin/bash\n\nhac state -s light.komode | while read -r change; do\n  state=$(echo \"$change\" | jq \".new_state.state\")\n\n  echo \"Light is now $state\"\ndone\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmawalu%2Fhomeassistant-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmawalu%2Fhomeassistant-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmawalu%2Fhomeassistant-cli/lists"}