Skip to content

LitoMore/cola-plugin-home-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cola-plugin-home-assistant

A Cola plugin that integrates with Home Assistant, allowing you to manage your smart home through natural language.

Note

This plugin is still in early development and may have limited functionality or stability. All features and configuration options are subject to change.

Features

  • Get entity states — Query all entities or filter by domain (lights, sensors, switches, etc.)
  • Control devices — Turn on/off lights, toggle switches, set thermostat temperatures, trigger automations, and more
  • View history — Check sensor readings and device state changes over time
  • Render templates — Execute Jinja2 templates for advanced queries
  • Fire events — Trigger custom events for automations
  • Service discovery — List available services and their capabilities

Setup

1. Create a Long-Lived Access Token in Home Assistant

  1. Open your Home Assistant UI
  2. Go to Profile (click your username in the sidebar)
  3. Scroll down to Long-Lived Access Tokens
  4. Click Create Token, give it a name (e.g., "Cola"), and copy the token

2. Install the Plugin

# Build
npm install
npm run build

# Install in Cola
cola plugin install /path/to/cola-plugin-home-assistant

3. Configure in Cola

After installing, configure the plugin in Cola's settings:

  • Home Assistant URL: Your HA instance URL (e.g., http://homeassistant.local:8123)
  • Long-Lived Access Token: The token you created in step 1

Usage Examples

Once configured, just talk to Cola naturally:

  • "Turn on the living room lights"
  • "What's the temperature in the bedroom?"
  • "Set the thermostat to 22 degrees"
  • "Show me all lights that are currently on"
  • "What was the humidity like in the last 24 hours?"
  • "Lock the front door"
  • "Trigger the goodnight automation"

Tools Provided

Tool Description
get_states Get all entity states, optionally filtered by domain
get_entity Get full state and attributes of a specific entity
call_service Call any HA service (turn_on, turn_off, set_temperature, etc.)
get_services List available services and domains
get_history Get state history for an entity over a time period
render_template Render a Jinja2 template
fire_event Fire a custom event

Development

npm install
npm run build

License

MIT

About

Home Assistant integration plugin for Cola

Topics

Resources

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Contributors

Languages