A interactive cli client for your home assistant instance.
yarn global add home-assistant-node-cli
or
npm install -g home-assistant-node-cli
hac
For the first running, it will prompt your to offer hass url & long-lived access token. The reulst will be saved in configuration file named '.hacrc.yaml' in your home directory. You can edit it with your like. After you logged in successfully, it will show you the dashboard which is composed of three blocks:
- Entity List (focusable) - the right one
- Entity Panel (focusable) - the left-top one
- History List (unfocusable) - the left-bottom one
Entity List shows all your entities by alph order of it's id: type + '.' + name. So entities with same type are next to each other. Entity List is focused by default, you can navigate with arrow keys:
- up / k - up
- down / j - down
- left / h - focus Entity Panel
- space - toggle the state of current entity if supported
- / (the slash key) - jump to next type
Entity Panel shows detail operations of current selected entity in Entity List.
- up / k - up
- down / j - down
- left / h - left
- right / l - right, or focus back to Entity List if no item at right side
- enter / space - select
History List show the lastest items of the past 24 hours.
- shift-left / shift-h: focus Entity Panel
- shift-right / shift-l: focus Entity List
- esc / q / ctrl+c: quit
- set havc mode
- set target temperature
- set fan mode
- set swing mode
- set state (on / off)
- set brightness
- set color temp
- set rgb color
- set state (open / closed)
- set position
- set state (on / off)
- volume up/down
- set state (on / off)
- pause/resume
- stop
- locate
- home
There are still some unsupported features due to my devices limitation. To help implete it, follows:
- run
yarn
to install dependencies - run
yarn build
to build src code - run
node dist/index
to start the application