Skip to main content

Helpers to send periodic information via MQTT to Home Assistant

Project description

ha_services

tests codecov ha_services @ PyPi Python Versions License GPL-3.0-or-later

Helpers to send periodic information via MQTT to Home Assistant

start development

~$ git clone https://github.com/jedie/ha-services.git
~$ cd inverter-connect
~/ha-services$ ./dev-cli.py --help

dev CLI

Usage: ./dev-cli.py [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help      Show this message and exit.                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ check-code-style            Check code style by calling darker + flake8                          │
│ coverage                    Run tests and show coverage report.                                  │
│ fix-code-style              Fix code style of all ha_services source code files via darker       │
│ install                     Run pip-sync and install 'ha_services' via pip as editable.          │
│ mypy                        Run Mypy (configured in pyproject.toml)                              │
│ publish                     Build and upload this project to PyPi                                │
│ safety                      Run safety check against current requirements files                  │
│ test                        Run unittests                                                        │
│ tox                         Run tox                                                              │
│ update                      Update "requirements*.txt" dependencies files                        │
│ update-test-snapshot-files  Update all test snapshot files (by remove and recreate all snapshot  │
│                             files)                                                               │
│ version                     Print version and exit                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

DEMO app CLI

Usage: ./cli.py [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help      Show this message and exit.                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ edit-settings         Edit the settings file. On first call: Create the default one.             │
│ print-settings        Display (anonymized) MQTT server username and password                     │
│ publish-loop          Publish data via MQTT for Home Assistant (endless loop)                    │
│ systemd-debug         Print Systemd service template + context + rendered file content.          │
│ systemd-remove        Write Systemd service file, enable it and (re-)start the service. (May     │
│                       need sudo)                                                                 │
│ systemd-setup         Write Systemd service file, enable it and (re-)start the service. (May     │
│                       need sudo)                                                                 │
│ systemd-status        Display status of systemd service. (May need sudo)                         │
│ systemd-stop          Stops the systemd service. (May need sudo)                                 │
│ test-mqtt-connection  Test connection to MQTT Server                                             │
│ version               Print version and exit                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

Backwards-incompatible changes

v2.0.0

Complete refactor of mqtt4homeassistant module. New usage, see: ha_services/example.py

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

ha-services-2.1.0.tar.gz (56.9 kB view details)

Uploaded Source

Built Distribution

ha_services-2.1.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file ha-services-2.1.0.tar.gz.

File metadata

  • Download URL: ha-services-2.1.0.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for ha-services-2.1.0.tar.gz
Algorithm Hash digest
SHA256 c0f8a86f885636a948f996a1e6120132b89d2b0e86ead61904a6bd83b761cfd3
MD5 379b1164cf7975f82ad50a6662cee031
BLAKE2b-256 86cc016d4372ca82275b0b72bf97c5998de02a73ea1889b8fcaf01fb6a12d47d

See more details on using hashes here.

Provenance

File details

Details for the file ha_services-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: ha_services-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for ha_services-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf39359b44101230b31dc764417ea67c946c4d7d486f029148dc7ad20bf74df4
MD5 dac287af8068c12c5fe32a3f98176487
BLAKE2b-256 e18b7359d0f2af31a2ac8878451030bea27500b79b63996c03914e55a1674e0b

See more details on using hashes here.

Provenance

Supported by

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