Skip to content

falldeaf/cmdline-assist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Home Assistant Assist CLI

The Home Assistant Assist CLI is a Python command-line application designed to interact with Home Assistant via the "Assist" pipeline. It enables users to send text intents directly to Home Assistant, facilitating seamless integration and control over smart home devices through terminal commands or interactive mode.

Screenshot of my application

Features

  • Send text intents to Home Assistant from the command line.
  • Interactive mode for real-time text intent communication.
  • Authentication via access token for secure connection.

Installation

If using a Windows machine, download the latest release. Then, create a .env file in the same directory as the executable with your Home Assistant access token and URL:

HATOKEN=your_access_token_here
HAURL=your_home_assistant_url_here

Installation from source

Prerequisites

  • Python 3.6 or higher
  • Home Assistant running instance
  • Access to Home Assistant's API via tokens

Setup

  1. Clone the repository to your local machine.
  • git clone
  • cd
  1. Install required Python packages.
pip install websocket-client python-dotenv
  1. Create a .env file in the root directory of the project with your Home Assistant access token and URL:
HATOKEN=your_access_token_here
HAURL=your_home_assistant_url_here

Usage

To use the Assist CLI, run the script with Python from the command line. There are two modes of operation:

Direct Intent Mode

You can send a direct intent as an argument:

python assist_cli.py "Turn on the living room lights"

Interactive Mode

Run the script without any arguments to enter interactive mode, then type your intents:

python assist_cli.py

Enter exit to quit interactive mode.

Configuration

The .env file contains your configuration settings. Ensure your HATOKEN and HAURL are correctly set to communicate with your Home Assistant instance.

Contributing

Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License. For more information, see the LICENSE file.


For more information on Home Assistant and its capabilities, visit Home Assistant's official website.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages