Skip to main content

A CLI tool to send custom sensor data to Home Assistant via MQTT

Project description

Home Assistant MQTT CLI

PyPI version License: MIT Python Versions

A command-line interface (CLI) tool to easily send custom sensor data to Home Assistant using MQTT Discovery.

Features

  • Easy Configuration: Interactive setup for MQTT broker connection.
  • 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

  1. Configure MQTT Connection:

    hamqtt configure
    

    Follow the prompts to enter your broker details.

  2. Register a Sensor:

    hamqtt register --unique-id my_temp_sensor --name "Living Room Temperature" --device-class temperature --unit "°C"
    
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hamqtt-0.1.0.tar.gz (88.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hamqtt-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file hamqtt-0.1.0.tar.gz.

File metadata

  • Download URL: hamqtt-0.1.0.tar.gz
  • Upload date:
  • Size: 88.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for hamqtt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 17ad7b75add407af85bcf154684e2e7cb2f66497c69d6b771bfb08f475a97029
MD5 497f373199b0a6ef7454a5ed2ff9a4b5
BLAKE2b-256 db1670e05bf16a413939f943876dc2686beb9c8104176d4882f6266f976e83fa

See more details on using hashes here.

File details

Details for the file hamqtt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hamqtt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for hamqtt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c6d8c7b1077fad376efd4aeaeb191e623f6a07d3620495e79e63565338f370a
MD5 858063bfaa5c1845c5bd95b79a51b2cb
BLAKE2b-256 c801cee84aa9cd84313597bfa6068d841737bbf1bb51ff66f0db53062547c5cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page