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.0.1.tar.gz (55.9 kB view details)

Uploaded Source

Built Distribution

ha_services-2.0.1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ha-services-2.0.1.tar.gz
  • Upload date:
  • Size: 55.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.0.1.tar.gz
Algorithm Hash digest
SHA256 8229354845d7a11df3667d561cd83dd319c6cc221eb3c8af7b5bbba442d70ec6
MD5 8c55ea25e685e15acce196c905a26105
BLAKE2b-256 6c9a78991b8dcdc140d27fa9104eb579775b58215c4ad7d1fa7c1e1db6d2cc83

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ha_services-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 25.8 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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 183fae280eb260979c9c87c8947a4bdb3700f9bcde8e7f2b72e88e13aa9fa249
MD5 c206ffc413f7cb41fd8d83cd70105ecc
BLAKE2b-256 dfff2027d61b7e4a24d725ad0df5309adf6b5c096c299e3faf1b3a933eacc272

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