# MicroPython Home Assistant integration 🏠
MHA allows to integrate an Micropython based device with Home Assistant using MQTT.
## Features
* Two-way communication (state reporting and command execution)
* MQTT discovery (device is added to the Home Assistant panel automatically)
* MQTT Last Will and Testament
* Support for custom MQTT messages (publishing and subscribing)
* Auto reconnect with MQTT broker
* Reporting availability (online/offline states) of a device
## Supported HA types
| Home Assistant type | Supported |
| ----------------------- | :--------: |
| [Alarm control panel][] | ❌ |
| [Binary sensor][] | ✅ |
| [Button][] | ❌ |
| [Camera][] | ❌ |
| [Cover][] | ❌ |
| [Device tracker][] | ❌ |
| [Device trigger][] | ❌ |
| [Event][] | ❌ |
| [Fan][] | ❌ |
| [Humidifier][] | ❌ |
| [Image][] | ❌ |
| [HVAC][] | ❌ |
| [Lawn mower][] | ❌ |
| [Light][] | ❌ |
| [Lock][] | ❌ |
| [Number][] | ❌ |
| [Scene][] | ❌ |
| [Select][] | ❌ |
| [Sensor][] | ❌ |
| [Siren][] | ❌ |
| [Switch][] | ❌ |
| [Update][] | ❌ |
| [Tag scanner][] | ❌ |
| [Text][] | ❌ |
| [Vacuum][] | ❌ |
| [Valve][] | ❌ |
| [Water heater][] | ❌ |
[Alarm control panel]: https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/
[Binary sensor]: https://www.home-assistant.io/integrations/binary_sensor.mqtt/
[Button]: https://www.home-assistant.io/integrations/button.mqtt/
[Camera]: https://www.home-assistant.io/integrations/camera.mqtt/
[Cover]: https://www.home-assistant.io/integrations/cover.mqtt/
[Device tracker]: https://www.home-assistant.io/integrations/device_tracker.mqtt/
[Device trigger]: https://www.home-assistant.io/integrations/device_trigger.mqtt/
[Event]: https://www.home-assistant.io/integrations/event.mqtt/
[Fan]: https://www.home-assistant.io/integrations/fan.mqtt/
[Humidifier]: https://www.home-assistant.io/integrations/humidifier.mqtt/
[Image]: https://www.home-assistant.io/integrations/image.mqtt/
[HVAC]: https://www.home-assistant.io/integrations/climate.mqtt/
[Lawn mower]: https://www.home-assistant.io/integrations/lawn_mower.mqtt/
[Light]: https://www.home-assistant.io/integrations/light.mqtt/
[Lock]: https://www.home-assistant.io/integrations/lock.mqtt/
[Number]: https://www.home-assistant.io/integrations/number.mqtt/
[Scene]: https://www.home-assistant.io/integrations/scene.mqtt/
[Select]: https://www.home-assistant.io/integrations/select.mqtt/
[Sensor]: https://www.home-assistant.io/integrations/sensor.mqtt/
[Siren]: https://www.home-assistant.io/integrations/siren.mqtt/
[Switch]: https://www.home-assistant.io/integrations/switch.mqtt/
[Update]: https://www.home-assistant.io/integrations/update.mqtt/
[Tag scanner]: https://www.home-assistant.io/integrations/tag.mqtt/
[Text]: https://www.home-assistant.io/integrations/text.mqtt/
[Vacuum]: https://www.home-assistant.io/integrations/vacuum.mqtt/
[Valve]: https://www.home-assistant.io/integrations/valve.mqtt/
[Water heater]: https://www.home-assistant.io/integrations/water_heater.mqtt/
## Examples
| Example | Description |
| ------------------------------------------ | ------------------------------------------------- |
| [Binary sensor](examples/binary_sensor.py) | Using the binary sensor as a door contact sensor. |
## Compatible platform
Here is the list of platform on which the library was tested:
- Micropython
- Python3
## Donate
If you think this project is helpful to you, you can donate to us to encourage the project to continue to develop and become more complete.
- PayPal
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://paypal.me/lbuque?country.x=C2&locale.x=zh_XC)
- WeChat
![](./assets/img/weixin.jpg)
- Alipay
![](./assets/img/alipay.jpeg)
Raw data
{
"_id": null,
"home_page": null,
"name": "micropython-home-assistant",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "micropython, home-assistant, MQTT",
"author": null,
"author_email": "lbuque <1102390310@qq.com>",
"download_url": "https://files.pythonhosted.org/packages/56/f5/3419ec65b8ec47a52d15f1e131a49d3696da7637299db9899c5656423526/micropython_home_assistant-0.1.0.tar.gz",
"platform": null,
"description": "# MicroPython Home Assistant integration \ud83c\udfe0\n\nMHA allows to integrate an Micropython based device with Home Assistant using MQTT.\n\n## Features\n\n* Two-way communication (state reporting and command execution)\n* MQTT discovery (device is added to the Home Assistant panel automatically)\n* MQTT Last Will and Testament\n* Support for custom MQTT messages (publishing and subscribing)\n* Auto reconnect with MQTT broker\n* Reporting availability (online/offline states) of a device\n\n## Supported HA types\n\n| Home Assistant type | Supported |\n| ----------------------- | :--------: |\n| [Alarm control panel][] | \u274c |\n| [Binary sensor][] | \u2705 |\n| [Button][] | \u274c |\n| [Camera][] | \u274c |\n| [Cover][] | \u274c |\n| [Device tracker][] | \u274c |\n| [Device trigger][] | \u274c |\n| [Event][] | \u274c |\n| [Fan][] | \u274c |\n| [Humidifier][] | \u274c |\n| [Image][] | \u274c |\n| [HVAC][] | \u274c |\n| [Lawn mower][] | \u274c |\n| [Light][] | \u274c |\n| [Lock][] | \u274c |\n| [Number][] | \u274c |\n| [Scene][] | \u274c |\n| [Select][] | \u274c |\n| [Sensor][] | \u274c |\n| [Siren][] | \u274c |\n| [Switch][] | \u274c |\n| [Update][] | \u274c |\n| [Tag scanner][] | \u274c |\n| [Text][] | \u274c |\n| [Vacuum][] | \u274c |\n| [Valve][] | \u274c |\n| [Water heater][] | \u274c |\n\n[Alarm control panel]: https://www.home-assistant.io/integrations/alarm_control_panel.mqtt/\n[Binary sensor]: https://www.home-assistant.io/integrations/binary_sensor.mqtt/\n[Button]: https://www.home-assistant.io/integrations/button.mqtt/\n[Camera]: https://www.home-assistant.io/integrations/camera.mqtt/\n[Cover]: https://www.home-assistant.io/integrations/cover.mqtt/\n[Device tracker]: https://www.home-assistant.io/integrations/device_tracker.mqtt/\n[Device trigger]: https://www.home-assistant.io/integrations/device_trigger.mqtt/\n[Event]: https://www.home-assistant.io/integrations/event.mqtt/\n[Fan]: https://www.home-assistant.io/integrations/fan.mqtt/\n[Humidifier]: https://www.home-assistant.io/integrations/humidifier.mqtt/\n[Image]: https://www.home-assistant.io/integrations/image.mqtt/\n[HVAC]: https://www.home-assistant.io/integrations/climate.mqtt/\n[Lawn mower]: https://www.home-assistant.io/integrations/lawn_mower.mqtt/\n[Light]: https://www.home-assistant.io/integrations/light.mqtt/\n[Lock]: https://www.home-assistant.io/integrations/lock.mqtt/\n[Number]: https://www.home-assistant.io/integrations/number.mqtt/\n[Scene]: https://www.home-assistant.io/integrations/scene.mqtt/\n[Select]: https://www.home-assistant.io/integrations/select.mqtt/\n[Sensor]: https://www.home-assistant.io/integrations/sensor.mqtt/\n[Siren]: https://www.home-assistant.io/integrations/siren.mqtt/\n[Switch]: https://www.home-assistant.io/integrations/switch.mqtt/\n[Update]: https://www.home-assistant.io/integrations/update.mqtt/\n[Tag scanner]: https://www.home-assistant.io/integrations/tag.mqtt/\n[Text]: https://www.home-assistant.io/integrations/text.mqtt/\n[Vacuum]: https://www.home-assistant.io/integrations/vacuum.mqtt/\n[Valve]: https://www.home-assistant.io/integrations/valve.mqtt/\n[Water heater]: https://www.home-assistant.io/integrations/water_heater.mqtt/\n\n## Examples\n\n| Example | Description |\n| ------------------------------------------ | ------------------------------------------------- |\n| [Binary sensor](examples/binary_sensor.py) | Using the binary sensor as a door contact sensor. |\n\n## Compatible platform\n\nHere is the list of platform on which the library was tested:\n\n- Micropython\n- Python3\n\n## Donate\n\nIf you think this project is helpful to you, you can donate to us to encourage the project to continue to develop and become more complete.\n\n- PayPal\n\n [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://paypal.me/lbuque?country.x=C2&locale.x=zh_XC)\n\n- WeChat\n\n ![](./assets/img/weixin.jpg)\n\n- Alipay\n\n ![](./assets/img/alipay.jpeg)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Home Assistant MQTT integration for MicroPython",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/lbuque/micropython-home-assistant"
},
"split_keywords": [
"micropython",
" home-assistant",
" mqtt"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c3b77fef5d68781fb4bb30ccdff84422bf8b0f09980772b4a6f1d2f384c771f3",
"md5": "66da66202a83e68c0233acc2ade42747",
"sha256": "b6a40d462891a2694c6afc6bce49602c83241d92af65f70412d780326a81011c"
},
"downloads": -1,
"filename": "micropython_home_assistant-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "66da66202a83e68c0233acc2ade42747",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13718,
"upload_time": "2024-04-14T13:09:23",
"upload_time_iso_8601": "2024-04-14T13:09:23.848344Z",
"url": "https://files.pythonhosted.org/packages/c3/b7/7fef5d68781fb4bb30ccdff84422bf8b0f09980772b4a6f1d2f384c771f3/micropython_home_assistant-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "56f53419ec65b8ec47a52d15f1e131a49d3696da7637299db9899c5656423526",
"md5": "3f44f5d5d61b37d5840d8511d6edcd06",
"sha256": "3fe6bef641da1c017b170d10bddc487019ed2855cbd2b7e09f270246d3226c54"
},
"downloads": -1,
"filename": "micropython_home_assistant-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "3f44f5d5d61b37d5840d8511d6edcd06",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 190871,
"upload_time": "2024-04-14T13:09:26",
"upload_time_iso_8601": "2024-04-14T13:09:26.089624Z",
"url": "https://files.pythonhosted.org/packages/56/f5/3419ec65b8ec47a52d15f1e131a49d3696da7637299db9899c5656423526/micropython_home_assistant-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-14 13:09:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lbuque",
"github_project": "micropython-home-assistant",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "micropython-home-assistant"
}