A CLI tool to send custom sensor data to Home Assistant via MQTT
Project description
Home Assistant MQTT CLI
A command-line interface (CLI) tool to easily send custom sensor data to Home Assistant using MQTT Discovery.
[!IMPORTANT] Rename Notice: This project has been renamed from
ha-clitohamqttto avoid a name clash with an existing PyPI package. Legacy configurations in~/.config/ha-cliwill be automatically migrated to~/.config/hamqtton the first run.
Features
- Easy Configuration: Interactive setup for MQTT broker connection. Supports
--showto view and--resetto clear configuration. - Auto-Discovery: Automatically registers entities with Home Assistant.
- Flexible: Supports sensors, binary sensors, and various device classes.
- Scriptable: Output JSON payloads for use with other tools or scripts.
Installation
Install using uv (recommended):
uv tool install hamqtt
Or using pip:
pip install hamqtt
Quick Start
-
Configure MQTT Connection:
hamqtt configureFollow the prompts to enter your broker details.
-
Register a Sensor:
hamqtt register --unique-id my_temp_sensor --name "Living Room Temperature" --device-class temperature --unit "°C"
-
Send Data:
hamqtt send --unique-id my_temp_sensor --state 22.5
Documentation
Full documentation is available at https://HWiese1980.github.io/hamqtt/.
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hamqtt-0.2.0.tar.gz.
File metadata
- Download URL: hamqtt-0.2.0.tar.gz
- Upload date:
- Size: 90.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c48ab140431aa893dde191f3b0be254955dc8a33c4b1f03aee30f3dbf29a5e0
|
|
| MD5 |
cbaa27da0f141729d55a26586d8a2e91
|
|
| BLAKE2b-256 |
265cfa1b381985bd432042f6fb4d4aa154eabe7a22bde17e2c36e652834f680c
|
File details
Details for the file hamqtt-0.2.0-py3-none-any.whl.
File metadata
- Download URL: hamqtt-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
413f69b92a1f74e91af91a06c5c80343b64cfbb2d869c0220372ebbc23a5d1c5
|
|
| MD5 |
9964a55b09c41671a967606274256c3c
|
|
| BLAKE2b-256 |
85bc976b74d7d18fbb978d14b5018202baff68552d636b749868bd5c9d7e24ea
|