mirror of
https://github.com/metrafonic/lxmf-ha-conversations.git
synced 2025-11-23 08:16:22 +00:00
Converse with a HomeAssistant instance over lxmf using the conversations API. Thanks to lxmfy
| src/lxmf_ha_conversations | ||
| .gitignore | ||
| pyproject.toml | ||
| README.md | ||
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