{"id":15581720,"url":"https://github.com/unixorn/ha-mqtt-discoverable-cli","last_synced_at":"2026-03-10T07:32:08.906Z","repository":{"id":140611975,"uuid":"611492050","full_name":"unixorn/ha-mqtt-discoverable-cli","owner":"unixorn","description":"A cli for creating Home Assistant compatible MQTT entities that will be automatically discovered.","archived":false,"fork":false,"pushed_at":"2024-10-23T19:25:04.000Z","size":443,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-25T20:52:20.346Z","etag":null,"topics":["hacktoberfest","home-assistant","home-assistant-addons","mqtt","mqtt-client","mqtt-smarthome"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unixorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"Code_of_Conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"unixorn","patreon":"unixorn","open_collective":null,"ko_fi":"unixorn","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.redbubble.com/people/unixorn/shop?asc=u"}},"created_at":"2023-03-08T23:48:39.000Z","updated_at":"2024-10-23T19:25:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9ae7254-60da-4621-9d89-d2fa1c8e3832","html_url":"https://github.com/unixorn/ha-mqtt-discoverable-cli","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixorn%2Fha-mqtt-discoverable-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixorn%2Fha-mqtt-discoverable-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixorn%2Fha-mqtt-discoverable-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixorn%2Fha-mqtt-discoverable-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unixorn","download_url":"https://codeload.github.com/unixorn/ha-mqtt-discoverable-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221832291,"owners_count":16888209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","home-assistant","home-assistant-addons","mqtt","mqtt-client","mqtt-smarthome"],"created_at":"2024-10-02T19:53:42.959Z","updated_at":"2026-03-10T07:32:08.866Z","avatar_url":"https://github.com/unixorn.png","language":"Python","funding_links":["https://github.com/sponsors/unixorn","https://patreon.com/unixorn","https://ko-fi.com/unixorn","https://www.redbubble.com/people/unixorn/shop?asc=u"],"categories":[],"sub_categories":[],"readme":"# ha-mqtt-discoverable-cli\n\n[![License](https://img.shields.io/github/license/unixorn/ha-mqtt-discoverable-cli.svg)](https://opensource.org/license/apache-2-0/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![GitHub last commit (branch)](https://img.shields.io/github/last-commit/unixorn/ha-mqtt-discoverable-cli/main.svg)](https://github.com/unixorn/ha-mqtt-discoverable-cli)\n[![Downloads](https://static.pepy.tech/badge/ha-mqtt-discoverable-cli)](https://pepy.tech/project/ha-mqtt-discoverable-cli)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n## Table of Contents\n\n- [Installing](#installing)\n  - [Native install](#native-install)\n  - [Docker](#docker)\n  - [ZSH Frameworks](#zsh-frameworks)\n- [Scripts Provided](#scripts-provided)\n  - [`hmd`](#hmd)\n  - [`hmd create binary sensor`](#hmd-create-binary-sensor)\n  - [`hmd create device`](#hmd-create-device)\n- [Contributing](#contributing)\n- [Contributors](#contributors)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\nThis repository contains CLI scripts for CRUD operations on MQTT entities that will be autodetected by Home Assistant.\n\nIt is a set of wrapper scripts for the [ha-mqtt-discoverable](https://github.com/unixorn/ha-mqtt-discoverable) python module.\n\n## Installing\n\n### Native install\n\n`pip install ha-mqtt-discoverable-cli` will install the cli tools. If you prefer to keep your system python clear of extra modules, you can use the `unixorn/ha-mqtt-discoverable-cli` docker image instead.\n\n### Docker\n\nIf you only need to use the command line tools, the simplest way is to use them with `docker` or `nerdctl`. It won't interfere with your system python and potentially cause you issues there.\n\nYou can use the [unixorn/ha-mqtt-discoverable-cli](https://hub.docker.com/repository/docker/unixorn/ha-mqtt-discoverable-cli) image on dockerhub directly, but if you add `$reporoot/bin` to your `$PATH`, the `hmd` script there will automatically run the command line tools inside a docker container with `docker` or `nerdctl`, depending on what it finds in your `$PATH`.\n\n### ZSH Frameworks\n\nYou can load the tools with your ZSH framework of choice by referring to `unixorn/ha-mqtt-discoverable-cli`.\n\nIf you're using [Zgenom](https://github.com/jandamm/zgenom):\n\n1. Add `zgenom load unixorn/ha-mqtt-discoverable-cli` to your `.zshrc` along with your other `zgenom load` commands.\n2. `zgenom reset \u0026\u0026 zgenom save`\n\n\n## Scripts Provided\n\nThe `ha_mqtt_discoverable-cli` module installs the following helper scripts you can use in your own shell scripts.\n\n### `hmd`\n\nUses the [gitlike-commands](https://github.com/unixorn/gitlike-commands/) module to find and execute `hmd` subcommands. Allows you to run `hmd create binary sensor` and `hmd` will find and run `hmd-create-binary-sensor` and pass it all the command line options.\n\n### `hmd create binary sensor`\n\nCreate/Update a binary sensor and set its state.\n\nUsage: `hmd create binary sensor --device-name mfsmaster --device-id 8675309 --mqtt-user HASS_MQTT_USER --mqtt-password HASS_MQTT_PASSWORD --client-name inquisition --mqtt-server mqtt.unixorn.net --metric-name tamper --device-class motion --state off`\n\n### `hmd create device`\n\nCreate/Update a device and set the state of multiple metrics on it.\n\nUsage: `hmd create device --device-name coyote --device-id 8675309 --mqtt-user HASS_MQTT_USER --mqtt-password HASS_MQTT_PASSWORD --mqtt-server mqtt.example.com --model 'Rocket Skates' --manufacturer 'Acme Products' --metric-data '{\"name\":\"Left Rocket Skate\",\"value\":93}' --metric-data '{\"name\":\"Right Rocket Skate\",\"value\":155}' --unique-id 'hmd-26536'`\n\n## Contributing\n\nPlease run `black` on your code before submitting. There are `git` hooks already configured to run `black` and other checks before every commit, please run `pre-commit install` to enable them.\n\n## Contributors\n\n\u003ca href=\"https://github.com/unixorn/ha-mqtt-discoverable-cli/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contributors-img.web.app/image?repo=unixorn/ha-mqtt-discoverable-cli\" /\u003e\n\u003c/a\u003e\n\nMade with [contributors-img](https://contributors-img.web.app).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funixorn%2Fha-mqtt-discoverable-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funixorn%2Fha-mqtt-discoverable-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funixorn%2Fha-mqtt-discoverable-cli/lists"}