bieniu / ha-shellies-discovery
Script that adds MQTT discovery support for Shellies devices
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing bieniu/ha-shellies-discovery in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewShellies Discovery [![GitHub Release][releases-shield]][releases] [![GitHub All Releases][downloads-total-shield]][releases] [![hacs_badge][hacs-shield]][hacs] [![Community Forum][forum-shield]][forum] [![Buy me a coffee][buy-me-a-coffee-shield]][buy-me-a-coffee] [![PayPal_Me][paypal-me-shield]][paypal-me] [![Revolut.Me][revolut-me-shield]][revolut-me] This script adds MQTT discovery support for Shelly devices in the Home Assistant. Gen2/3 devices information Pro/Plus devies are supported by Shellies Discovery Gen2 script. Prerequisites This script needs Home Assistant component so, if you never used it, I strongly suggest you to follow the official instruction and check that is properly configured and it's working. MQTT integration must be configured in Home Assistant. Installation You can download file and save it in folder or install the script via HACS. You won't find **Shellies Discovery** in the HACS **Integrations** section, nor add it as a custom repository. You must have a properly configured component to be able to install the script from the HACS **Automations** section. After installing the script and adding automations, run automation or restart Home Assistant twice. Go to HA community for support and help. Supported devices • Shelly 1 (with external sensors and external switch) • Shelly 1L (with external sensors) • Shelly 1PM (with external sensors) • Shelly 2 (relays and roller mode) • Shelly 2.5 (relays and roller mode) • Shelly 3EM • Shelly 4Pro • Shelly Air • Shelly Button1 (battery or USB powered) • Shelly Dimmer • Shelly Dimmer 2 • Shelly Door/Window • Shelly Door/Window 2 • Shelly DUO • Shelly DUO RGBW • Shelly EM • Shelly Flood • Shelly Gas (with Valve Add-on) • Shelly H&T (battery or USB powered) • Shelly i3 • Shelly Motion (battery or USB powered) • Shelly Motion 2 (battery or USB powered) • Shelly Plug • Shelly Plug S • Shelly Plug US • Shelly RGBW2 (color and white mode) • Shelly Sense (battery or USB powered) • Shelly Smoke • Shelly UNI (with external sensors) • Shelly Valve • Shelly Vintage How to debug To debug the script add this to your configuration: Troubleshooting checklist • correct MQTT configuration in Home Assistant with enabled • same in Home Assistant configuration and in script configuration • Shellies firmware updated to current version • Home Assistant updated to current version • enabled MQTT in Shellies configuration • you can't manually run the script ( error) Shelly device name The script supports Shelly devices with non-standard names ( -> -> in the Shelly WWW panel). If you want to change the name of the Shelly device, you must first remove the device from Home Assistant ( -> -> -> Device -> ). Otherwise, all device entities will be duplicated. Minimal configuration Custom configuration example Battery powered devices For battery powered devices, the script requires you to set the value of 12h for or to configure yourself. Don't send topic more than once an hour if you're using Shelly Motion! This can quickly drain your device's battery. How to use device automation triggers? Script arguments key | optional | type | default | description -- | -- | -- | -- | -- | True | string | | MQTT discovery prefix | True | integer | | MQTT QoS, you can use , or | True | list | | list of devices to ignore | True | boolean | | ignore device model to generate device name | True | boolean | | | option for cover entities Device arguments key | optional | type | default | possible values | description -- | -- | -- | -- | -- | -- | True | string | | | name of the device | True | string | | , , | component to use with the relay number | True | string | None | string | friendly name of the relay number | True | string | None | string | friendly name of the roller number | True | string | None | string | device_class of the roller number | True | string | None | string | friendly name of the light number | True | boolean | | , | presence of temperature sensor number | True | boolean | | , | presence of humidity sensor number | True | boolean | | , | presence of external switch | True | boolean | | , | force update for sensors | True | string | | , | or powered for Shelly H&T, Motion, Sense and Button1 | True | integer | | | expire after for battery powered sensors in seconds | True | boolean | | , | whether the temperature sensor is configured in Fahrenheit for H&T, Flood, Motion2 or DW2 | True | float | | | default target temperature after changing from OFF to HEAT mode | True | int | | | this value should be equal to the MINIMAL VALVE POSITION LIMIT from Shelly Valve configuration | True | boolean | | , | is the Valve Add-on connected to Shelly Gas | True | string | | | Topic with humidity value to display in the Shelly Valve climate entity [releases]: https://github.com/bieniu/ha-shellies-discovery/releases [releases-shield]: https://img.shields.io/github/release/bieniu/ha-shellies-discovery.svg?style=popout [downloads-total-shield]: https://img.shields.io/github/downloads/bieniu/ha-shellies-discovery/total [forum]: https://community.home-assistant.io/t/shellies-discovery-script/94048 [forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=popout [buy-me-a-coffee-shield]: https://img.shields.io/static/v1.svg?label=%20&message=Buy%20me%20a%20coffee&color=6f4e37&logo=buy%20me%20a%20coffee&logoColor=white [buy-me-a-coffee]: https://www.buymeacoffee.com/QnLdxeaqO [paypal-me-shield]: https://img.shields.io/static/v1.svg?label=%20&message=PayPal.Me&logo=paypal [paypal-me]: https://www.paypal.me/bieniu79 [hacs-shield]: https://img.shields.io/badge/HACS-Default-orange.svg [hacs]: https://hacs.xyz/docs/default_repositories [revolut-me-shield]: https://img.shields.io/static/v1.svg?label=%20&message=Revolut&logo=revolut [revolut-me]: https://revolut.me/maciejbieniek