Converse with a HomeAssistant instance over lxmf using the conversations API. Thanks to lxmfy
Find a file
2025-05-26 21:23:55 +02:00
src/lxmf_ha_conversations initial commit 2025-05-26 21:12:30 +02:00
.gitignore initial commit 2025-05-26 21:12:30 +02:00
pyproject.toml initial commit 2025-05-26 21:12:30 +02:00
README.md updated install docs 2025-05-26 21:23:55 +02:00

LXMF HA Conversations

Converse with a Home Assistant instance over lxmf using the conversations API

Installation

pipx install git+https://github.com/metrafonic/lxmf-ha-conversations

Start the program

lxmf-ha-conversations

Configuration

The command line arguments are used first, then environment variables, and finally defaults. Command line arguments:

  • --ha-url - The URL of your Home Assistant instance.
  • --ha-token - Your Home Assistant token. (Retrive from your profile settings)
  • --admins - A list of LXMF hashes for admins.
  • --name - The name of the bot.

Environment variables:

  • BOT_HA_URL - The URL of your Home Assistant instance.
  • BOT_HA_TOKEN - Your Home Assistant token.
  • BOT_ADMIN_HASHES - A list of LXMF hashes for admins.
  • BOT_NAME - The name of the bot.

Running the Bot

Take note, the bot will create and use the folders config/ and data/ in your current working directory.

$ lxmf-ha-conversations --help
INFO:lxmf_ha_conversations:Welcome to lxmf_ha_conversations v0.1.0
usage: lxmf-ha-conversations [-h] [--ha-url HA_URL] [--ha-token HA_TOKEN] [--admins ADMINS [ADMINS ...]] [--name NAME]

options:
  -h, --help            show this help message and exit
  --ha-url HA_URL       Home Assistant URL
  --ha-token HA_TOKEN   Home Assistant token
  --admins ADMINS [ADMINS ...]
                        Admin user LXMF hashes
  --name NAME           Name of the LXMF bot

Usage:

See sentances here: https://www.home-assistant.io/voice_control/builtin_sentences/

Prefix your sentences with !ha to have them run in Home Assistant.

!ha turn on the kitchen lights