Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zibous/ha-mqtt-discovery

A library that provides tools to simplify MQTT discovery implementation for Home Assistant to your device.
https://github.com/zibous/ha-mqtt-discovery

discovery-service homeassistant mqtt

Last synced: 19 days ago
JSON representation

A library that provides tools to simplify MQTT discovery implementation for Home Assistant to your device.

Awesome Lists containing this project

README

        

# ha-mqtt-discovery
A library that provides tools to simplify MQTT discovery implementation for Home Assistant to your device.

![ha-mqtt-discovery](doc/mqtt_explorer_data.png)

## Generate MQTT entities in Home Assistant
1. Create `devices/ha/DEVICENAME/discovery.yaml`
2. Optional add additional discovery items schema to `devices/ha/DEVICENAME/schemalist.yaml`
3. Add device and sourcfolder to `config.py`
4. Run `python3 app.py`

```python
#!/usr/bin/python3
# -*- coding":" utf-8 -*-

from lib import logger
from conf import *
from lib.ha_discoveryitems import *

log = logger.Log(__name__, LOG_LEVEL)

if __name__ == "__main__":
"""simple testcase to create and publish ha mqtt discovery items"""
for device in DEVICES:
print(device["device"])
hadis = haDiscoveryItems(devicename=device["device"], folder=device["source"])
n = hadis.publish()
log.info("HA Discovery {} Items: {}".format(device["device"], n))
```


## Info
>>
https://github.com/plapointe6/HAMqttDevice

https://github.com/shaonianzhentan/node-red-contrib-ha-mqtt

https://flows.nodered.org/node/node-red-contrib-ha-mqtt

https://webworxshop.com/home-assistant-mqtt-discovery-sensors-in-node-red/

https://roelofjanelsinga.com/articles/mqtt-discovery-with-an-arduino/