Name | mqtt-entity JSON |
Version |
1.0.11
JSON |
| download |
home_page | None |
Summary | MQTT client supporting Home Assistant MQTT entity auto-discovery |
upload_time | 2025-07-08 18:21:37 |
maintainer | None |
docs_url | None |
author | Johann Kellerman |
requires_python | >=3.12 |
license | MIT License Copyright (c) 2021-2025 Johann Kellerman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
home-assistant
mqtt
library
discovery
asyncio
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MQTT Entity helper library for Home Assistant
[](https://codecov.io/gh/kellerza/mqtt_entity)
A Python helper library to manage Home Assistant entities over MQTT.
Updated for device based MQTT discovery.
Features:
- MQTT client based on paho-mqtt
- Manage MQTT discovery info (adding/removing entities)
- MQTTDevice class to manage devices
- Availability management
- Manage entities per device
- Entities modelled as classes:
- Read-only: Sensor, BinarySensor
- Read & write: Select, Switch, Number
- MQTT device event
- Asyncio based
- Helper for Home Assistant addon configuration (optional)
## Why?
This MQTT code was included in several of my home Assistant addons (SMA-EM / Sunsynk). It is easier to update a single library & add new features, like discovery removal.
Alternatives options (not based on asyncio)
- <https://pypi.org/project/ha-mqtt-discoverable/>
- <https://pypi.org/project/homeassistant-mqtt-binding/>
## Credits
@Ivan-L contributed some of the writable entities to the Sunsynk addon project
## Release
Semantic versioning is used for release.
To create a new release, include a commit with a :dolphin: emoji as a prefix in the commit message. This will trigger a release on the master branch.
```bash
# Patch
git commit -m ":dolphin: Release 0.0.x"
# Minor
git commit -m ":rocket: Release 0.x.0"
```
### Development
To run the tests, you need to have Python 3.12+ installed.
The `--mqtt` connects to a live Home Assistant instance using the MQTT broker.
```bash
uv run pytest --mqtt
```
Raw data
{
"_id": null,
"home_page": null,
"name": "mqtt-entity",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "home-assistant, mqtt, library, discovery, asyncio",
"author": "Johann Kellerman",
"author_email": "Johann Kellerman <johann.kellerman@nokia.com>",
"download_url": "https://files.pythonhosted.org/packages/dc/0c/38e806a3da3a9b0c498dbf5e0889c510d5a2232addb444379e840adb4b92/mqtt_entity-1.0.11.tar.gz",
"platform": null,
"description": "# MQTT Entity helper library for Home Assistant\n\n[](https://codecov.io/gh/kellerza/mqtt_entity)\n\nA Python helper library to manage Home Assistant entities over MQTT.\n\nUpdated for device based MQTT discovery.\n\nFeatures:\n\n- MQTT client based on paho-mqtt\n- Manage MQTT discovery info (adding/removing entities)\n- MQTTDevice class to manage devices\n - Availability management\n - Manage entities per device\n- Entities modelled as classes:\n - Read-only: Sensor, BinarySensor\n - Read & write: Select, Switch, Number\n - MQTT device event\n- Asyncio based\n- Helper for Home Assistant addon configuration (optional)\n\n## Why?\n\nThis MQTT code was included in several of my home Assistant addons (SMA-EM / Sunsynk). It is easier to update a single library & add new features, like discovery removal.\n\nAlternatives options (not based on asyncio)\n\n- <https://pypi.org/project/ha-mqtt-discoverable/>\n- <https://pypi.org/project/homeassistant-mqtt-binding/>\n\n## Credits\n\n@Ivan-L contributed some of the writable entities to the Sunsynk addon project\n\n## Release\n\nSemantic versioning is used for release.\n\nTo create a new release, include a commit with a :dolphin: emoji as a prefix in the commit message. This will trigger a release on the master branch.\n\n```bash\n# Patch\ngit commit -m \":dolphin: Release 0.0.x\"\n\n# Minor\ngit commit -m \":rocket: Release 0.x.0\"\n```\n\n### Development\n\nTo run the tests, you need to have Python 3.12+ installed.\n\nThe `--mqtt` connects to a live Home Assistant instance using the MQTT broker.\n\n```bash\nuv run pytest --mqtt\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2021-2025 Johann Kellerman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "MQTT client supporting Home Assistant MQTT entity auto-discovery",
"version": "1.0.11",
"project_urls": null,
"split_keywords": [
"home-assistant",
" mqtt",
" library",
" discovery",
" asyncio"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8330c206749ab3136761ce2e1e830781beaa95f4a8616fee9a6b470908073f84",
"md5": "de04c11f61e3b343dd66eaa2ac050081",
"sha256": "35e6e6a9a0d6245cccc69814ef80ad0840e382b6ed7deb1599932d4fa5a2f13f"
},
"downloads": -1,
"filename": "mqtt_entity-1.0.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "de04c11f61e3b343dd66eaa2ac050081",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 15560,
"upload_time": "2025-07-08T18:21:36",
"upload_time_iso_8601": "2025-07-08T18:21:36.543495Z",
"url": "https://files.pythonhosted.org/packages/83/30/c206749ab3136761ce2e1e830781beaa95f4a8616fee9a6b470908073f84/mqtt_entity-1.0.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "dc0c38e806a3da3a9b0c498dbf5e0889c510d5a2232addb444379e840adb4b92",
"md5": "01705f80684d31f7c8645954b0d4ee6f",
"sha256": "62468ee3809b6d866c522e6fe284cdec7735fc3538e06a9e5e3484209c1c956e"
},
"downloads": -1,
"filename": "mqtt_entity-1.0.11.tar.gz",
"has_sig": false,
"md5_digest": "01705f80684d31f7c8645954b0d4ee6f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 13753,
"upload_time": "2025-07-08T18:21:37",
"upload_time_iso_8601": "2025-07-08T18:21:37.668291Z",
"url": "https://files.pythonhosted.org/packages/dc/0c/38e806a3da3a9b0c498dbf5e0889c510d5a2232addb444379e840adb4b92/mqtt_entity-1.0.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-08 18:21:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mqtt-entity"
}