Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kellerza/mqtt_entity
MQTT Entity helper library for Home Assistant
https://github.com/kellerza/mqtt_entity
async asyncio home-assistant mqtt
Last synced: about 1 month ago
JSON representation
MQTT Entity helper library for Home Assistant
- Host: GitHub
- URL: https://github.com/kellerza/mqtt_entity
- Owner: kellerza
- License: mit
- Created: 2023-04-15T20:23:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-17T16:24:43.000Z (5 months ago)
- Last Synced: 2024-10-26T05:18:08.793Z (3 months ago)
- Topics: async, asyncio, home-assistant, mqtt
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MQTT Entity helper library for Home Assistant
[![codecov](https://codecov.io/gh/kellerza/mqtt_entity/branch/main/graph/badge.svg?token=PG4N1YBUGW)](https://codecov.io/gh/kellerza/mqtt_entity)A Python helper library to manage Home Assistant entities over MQTT.
Features:
- MQTT entity discovery info (persistent messages)
- Option to remove persistent discovery info
- Availability management
- Manage entities per device
- Entities modelled as classes
- Supported entities:
- Read-only: Sensor, BinarySensor
- Read & write: Select, Switch, Number
- Asyncio basedMQTTClient based on paho-mqtt.
## Why?
This MQTT code was included in several of my home Assistant addons (SMA-EM / Sunsynk) and finally decided to extract it in a separate library to leverage recent updates & 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