Shelly

Integrate Shelly devices into Home Assistant.

Configuration

To add the Shelly device to your Home Assistant instance, use this My button:

Shelly can be auto-discovered by Home Assistant. If an instance was found, it will be shown as Discovered. You can then set it up right away.

Manual configuration steps

If it wasn’t discovered automatically, don’t worry! You can set up a manual integration entry:

Host

The Hostname or IP address of your Shelly device. You can find it in your router.

Port

Custom TCP port of the device. Change this only if the device is connected via Shelly Range Extender.

Verify SSL

Verify SSL/TLS certificate when connecting on HTTPS (port 443, Gen2+). Enable this only if the device uses a certificate signed by a certificate authority your Home Assistant instance trusts.

Options

To define options for Shelly, follow these steps:

  1. In Home Assistant, go to Settings > Devices & services.

  2. If multiple instances of Shelly are configured, choose the instance you want to configure.

  3. On the card, select the cogwheel .

    • If the card does not have a cogwheel, the integration does not support options for this device.

    Screenshot showing the cogwheel icon on an integration card in the Settings > Devices & services page

  4. Edit the options, then select Submit to save the changes.

Bluetooth scanner mode

Pick how the Shelly scans for Bluetooth devices.
Auto is recommended for most setups. The Shelly listens passively and only briefly switches to active scanning when needed, saving around 95% of the scan related battery drain on your Bluetooth devices while still discovering devices and updates quickly.
Active continuously asks devices for full information. Updates are the fastest, but it uses more battery on the devices around you.
Passive only listens; never asks devices for extra information. Uses the least battery on your devices, but some details may be missing because some integrations need active scanning to work.
Disabled turns the Shelly Bluetooth scanner off.

Shelly device generations

There are four generations of devices and all generations are supported by this integration. There are some differences in how devices should be configured and in the naming of entities and devices between generations.

Shelly BLU series devices (for example, Shelly BLU H&T) are not supported; please use the BTHome integration to configure such devices with Home Assistant. The exception to this is Shelly BLU TRV, which is supported by this integration via Shelly BLU Gateway Gen3 or Shelly IR Controller Gen4.

Shelly Enhanced Security

Enhanced Security is a firmware 2.0.0 feature for Gen2+ devices that enables additional security measures required for compliance with the European Union’s Radio Equipment Directive (RED). When enabled, the device uses HTTPS and enforces secure communication. Devices shipped from factory with firmware 2.0.0+ come with HTTPS already enabled using certificates issued by Shelly’s internal PKI. Devices that were updated to firmware 2.0.0+ (but not originally shipped with it) do not have factory-provisioned certificates and serve only plain HTTP by default, so you must enable Enhanced Security manually and upload your own certificate to enable HTTPS. See the official guide for instructions on creating and installing a certificate. Enhanced Security can also be enabled without uploading a HTTPS certificate, allowing you to preserve compatibility with 3rd-party HTTP-only integrations.

The Shelly integration automatically detects whether HTTPS is configured on the device and always communicates with that device over HTTPS using port 443. If you uploaded a certificate signed by a certificate authority your Home Assistant instance trusts, enable Verify SSL; otherwise, leave it disabled.

Data updates

Shelly devices push updates to Home Assistant upon changes for all main functions of the device. For push updates to work correctly, some devices need additional configuration:

Shelly device configuration (generation 1)

Generation 1 devices use the CoIoT protocol to communicate with the integration. CoIoT must be enabled in the device settings. Navigate to the local IP address of your Shelly device, Internet & Security > ADVANCED - DEVELOPER SETTINGS and check the box Enable CoIoT.

We recommend using unicast for communication. To enable this, enter the local IP address of the Home Assistant server and port 5683 into the CoIoT peer field and push SAVE button. This is mandatory for battery operated devices (even if USB connected). After changing the CoIoT peer, the Shelly device needs to be manually restarted.

Home Assistant will display a repair issue for the Shelly device if push updates from this device do not reach the Home Assistant server.

The list below will help you diagnose and fix the problem:

  • Check if your Shelly devices have a properly configured CoIoT peer.
  • If you can’t find the CoIoT peer settings in the device’s web panel, it’s probably using an ancient firmware version, and you should update it to the current one.
  • If Shelly devices are in a different subnet than the Home Assistant server, you should ensure communication on UDP port 5683 between these subnets.
  • If Home Assistant is running as a virtual machine or service on an operating system other than Home Assistant OS, you should open UDP port 5683 on the device’s firewall and/or ensure that communication from this port is redirected to the Home Assistant service.
  • The missing push updates may be related to the WiFi network range. If using a WiFi network with several access points, enable Internet & Security >> WiFi Client AP Roaming option. Consider moving Shelly device closer to the WiFi access point. Consider adding another WiFi access point, which will improve the connection quality with the device.
  • If you think your Shelly devices are working correctly and don’t want to change your network/configuration, you can ignore the repair issue. Still, you must know you are giving up the best experience of using first-generation Shelly devices with Home Assistant.

Shelly device configuration (generation 2+)

Generation 2+ devices use the RPC protocol to communicate with Home Assistant. By default, no additional configuration is required.

Only battery-operated devices (even if connected via USB) may need manual outbound WebSocket configuration if Home Assistant cannot correctly determine your instance’s internal URL, or if the outbound WebSocket was previously configured for a different Home Assistant instance. In this case, navigate to the local IP address of your Shelly device, Settings > Connectivity > Outbound WebSocket, and select Enable Outbound WebSocket. Under Server, enter the following address:

ws:// + Home_Assistant_local_ip_address:Port + /api/shelly/ws (for example: ws://192.168.1.100:8123/api/shelly/ws), click Apply to save the settings. In case your installation is set up to use SSL encryption (HTTPS with certificate), an additional s needs to be added to the WebSocket protocol, too, so that it reads wss:// (for example: wss://192.168.1.100:8123/api/shelly/ws).

Note

Integration is communicating directly with the device; cloud connection is not needed.

Shelly entities that poll data from the device (generation 1)

The following disabled by default entities pollData polling is the process of querying a device or service at regular intervals to check for updates or retrieve data. By defining a custom polling interval, you can control how frequently your system checks for new data, which can help optimize performance and reduce unnecessary network traffic. [Learn more] data from the device every 60 seconds:

  • Cloud connected sensor
  • RSSI sensor
  • Uptime sensor
  • Firmware update

Shelly entities that poll data from the device (generation 2+)

The following disabled by default entities pollData polling is the process of querying a device or service at regular intervals to check for updates or retrieve data. By defining a custom polling interval, you can control how frequently your system checks for new data, which can help optimize performance and reduce unnecessary network traffic. [Learn more] data from the device every 60 seconds:

  • Device temperature sensor
  • RSSI sensor
  • Uptime sensor

Bluetooth Support

Shelly Gen 2 and newer devices (excluding battery-powered models) can act as Bluetooth proxies, forwarding advertisement data. You can enable either active or passive listening through the device’s options flow.

Tip

Shelly devices do not support proxying active (GATT) connections.

For more details, see Remote Adapters in the Bluetooth integration.

Range Extender Support

Shelly generation 2+ devices that are not battery-powered can act as a Range Extender. Devices of the same generations can be configured via those Range Extenders specifying a custom TCP port during the configuration flow. Currently, only static IP or DHCP reserved IP are supported for the main device.

Entity naming (generation 1)

The integration uses the following strategy to name its devices and entities if the device has only one relay (channel) or no relays at all:

  • If a Device Name is set in the device, the integration will use it to generate the device name and entity names.
  • If a Device Name is not set, the integration will use the Device ID to generate the device name and entity names.

If the device has more than one relay, the integration creates a child device for every relay (channel). The same applies to multi-channel lights, such as Shelly RGBW2 in white mode, and to energy meter channels. A child device is a part of the parent device, such as one relay of a multi-relay switch. Child devices share the model and firmware of the parent device and follow its area unless you assign them their own. If the devices are not in an area, the entity IDs of child devices start with the parent device name. The integration uses the following strategy to name the devices and entities:

  • If a Device Name is set in the device, the integration will use it to generate the parent device name and entity names assigned to the parent device.
  • If a Device Name is not set, the integration will use the Device ID to generate the parent device name and entity names assigned to the parent device.
  • If a Channel Name is set in the device, the integration will use it to generate the child device name and entity names assigned to this child device (channel/relay).
  • If a Channel Name is not set in the device, the integration will use the channel/relay number, for example Channel 1, to generate the child device name and entity names assigned to this child device (channel/relay). On Shelly 3EM, the child devices are named after the phase, for example Phase A.

Examples:

Device Name Channel Name Parent Device Name Child Device Name Entity Name Entity ID
Not set Not Set shellyswitch25-ABC123 Channel 1 Channel 1 switch.shellyswitch25_abc123_channel_1
Not set Kids Room Bulb shellyswitch25-ABC123 Kids Room Bulb Kids Room Bulb switch.shellyswitch25_abc123_kids_room_bulb
Kitchen Not Set Kitchen Channel 1 Channel 1 switch.kitchen_channel_1
Bedroom Round Bulb Bedroom Round Bulb Round Bulb switch.bedroom_round_bulb

Names are set from the device web page:

  • Device name can be set in Settings >> DEVICE NAME
  • Channel name for single-channel devices can be set in Settings >> CHANNEL NAME
  • Channel name for multi-channel devices can be set in Settings >> CHANNEL NAME after selecting the channel, by clicking on the channel name.

Entity naming (generation 2+)

The integration uses the following strategy to name its devices and entities if the device has only one relay (channel) or no relays at all:

  • If a Device Name is set in the device, the integration will use it to generate the device name and entity names.
  • If a Device Name is not set, the integration will use the Device ID to generate the device name and entity names.
  • If a Channel Name is set in the device, the integration will add it as a suffix to the entity names.

Examples:

Device Name Channel Name Integration Device Name Entity Name
Not set Not Set shelly1g3-aabbccddeeff shelly1g3-aabbccddeeff
Not set Kids Room Bulb shelly1g3-aabbccddeeff shelly1g3-aabbccddeeff Kids Room Bulb
Kitchen Not Set Kitchen Kitchen
Bedroom Round Bulb Bedroom Bedroom Round Bulb

If the device has more than one relay, the integration creates a child device for every relay (channel). The same applies to other multi-channel components, such as covers, lights, energy meters, energy meter phases, and irrigation zones. A child device is a part of the parent device, such as one output of a power strip. Child devices share the model and firmware of the parent device and follow its area unless you assign them their own. If the devices are not in an area, the entity IDs of child devices start with the parent device name. The integration uses the following strategy to name the devices and entities:

  • If a Device Name is set in the device, the integration will use it to generate the parent device name and entity names assigned to the parent device.
  • If a Device Name is not set, the integration will use the Device ID to generate the parent device name and entity names assigned to the parent device.
  • If a Channel Name is set in the device, the integration will use it to generate the child device name and entity names assigned to this child device (channel/relay).
  • If a Channel Name is not set in the device, the integration will use the component type and channel number, for example Output 0, to generate the child device name and entity names assigned to this child device (channel/relay).
  • Energy meter phases are always named after the phase, for example Phase A, even if a name is set for the energy meter in the device.

Examples:

Device Name Channel Name Parent Device Name Child Device Name Entity Name Entity ID
Not set Not Set shelly2pmg3-aabbccddeeff Output 0 Output 0 switch.shelly2pmg3_aabbccddeeff_output_0
Not set Kids Room Bulb shelly2pmg3-aabbccddeeff Kids Room Bulb Kids Room Bulb switch.shelly2pmg3_aabbccddeeff_kids_room_bulb
Kitchen Not Set Kitchen Output 0 Output 0 switch.kitchen_output_0
Bedroom Round Bulb Bedroom Round Bulb Round Bulb switch.bedroom_round_bulb

The integration also creates a child device for every IR device, even if there is only one. The child device is named after the IR device, or IR Device followed by its ID if the IR device has no name.

Note

Shelly BLU TRV devices are not child devices. A BLU TRV is a separate physical device that Home Assistant reaches through a Shelly BLU Gateway Gen3 or Shelly IR Controller Gen4. The integration creates it as a sub-device connected through that Shelly device. Unlike a child device, a BLU TRV has its own model and firmware, and it does not inherit the area of the Shelly device it connects through.

Cover entities

Shelly 2PM Gen3 supports tilt for cover entities. To enable this feature, you need to configure the device:

  • Change the device profile to Cover (Settings > Device profile)
  • Calibrate the cover (Home > Cover > Calibration > Start)
  • Enable and configure Slat control (Home > Cover > Slat control)

To move a cover and its tilt to target positions with a single command, use the Set cover position and tilt action.

Fan entities

Generation 2+ devices that have a fan component create a fan entity.

The fan entity lets you turn the fan on or off and set its speed as a percentage. It also has two preset modes:

  • Manual: You control the fan yourself by turning it on or off and setting the speed.
  • Auto: The device controls the fan automatically.

Turning the fan on or off from Home Assistant, or setting a speed, switches it to Manual mode. To let the device control the fan again, select the Auto preset mode. When you switch from Auto to Manual, the fan keeps its current on or off state and speed until you change it.

The integration also creates the following entities for the fan:

  • Boost: A switch entity that turns the boost function of the device on or off. It’s only available while the fan is in Auto mode.
  • Illuminance level: A sensor entity with the states Dark, Twilight, and Bright.
  • Humidity level: A sensor entity with the states Low, Medium, High, and Very high.
  • Energy: A sensor entity that shows the total energy consumed by the fan, in kWh by default.

Binary input sensors

Binary input sensors (generation 1)

Depending on how a device’s button type is configured, the integration will create binary sensors corresponding to those inputs. binary sensors are not created when the button type is momentary or momentary_on_release, for these types you need to use events for your automations.

Binary input sensors (generation 2+)

For generation 2+ hardware, it’s possible to select if a device’s input is connected to a button or a switch. Binary sensors are created only if the Input Mode is set to Switch. When the Input Mode is set to Button you need to use events for your automations.

Input lock

Generation 2+ devices with a physical input provide an Input lock switch. When it is on, the device ignores all changes to its physical inputs. The output can still be controlled from Home Assistant, the Shelly app, and automations.

The switch is created for every switch or cover channel that supports it. This entity is disabled by default. Changes made in the Shelly app or web interface are reflected in Home Assistant as well.

Switch usage counters

Generation 2+ switch channels that report usage counters get the following diagnostic sensors:

  • Total runtime: How long the output has been on.
  • Switching cycles: How many times the output has been turned on.
  • Runtime above power threshold: How long the output has been on while its power was above the threshold set on the device.

The runtime sensors show hours by default. The integration only creates the sensors that the device firmware reports. These entities are disabled by default.

LED mode of plugs and power strips

Generation 2+ plugs and power strips with LED settings provide an LED mode select entity. Use it to choose what the LED shows:

  • Power consumption: The LED shows the power consumption.
  • Switch state: The LED shows whether the output is on or off.
  • Off: The LED is off.

Changes made in the Shelly app or web interface are reflected in Home Assistant without reloading the device.

Media player entities

Wall Display devices with firmware 2.2 or newer can function as media players. The integration creates media player entities for them.

The Wall Display media player can play the following audio formats:

  • Local audio files uploaded to the Wall Display media library
  • Internet radio stations added to your favorites

These audio files and your favorite radio stations are visible in the Home Assistant media browser.

Play media using the media_player.play_media action

This action will start playing your favorite radio station with ID 2:

action: media_player.play_media
data:
  media:
    media_content_id: 2
    media_content_type: radio
target:
  entity_id: media_player.shelly_wall_display

This action will start playing your audio file with ID 15:

action: media_player.play_media
data:
  media:
    media_content_id: 15
    media_content_type: audio
target:
  entity_id: media_player.shelly_wall_display

Wall Display brightness

Wall Display devices with firmware 2.6.2 or newer provide entities to control the screen brightness:

  • Auto display brightness switch: When on, the device adjusts the brightness to the ambient light.
  • Display brightness (0–100%): The screen brightness when auto brightness is off. This entity is unavailable while auto brightness is on, because the device then sets the brightness itself.
  • Minimum auto display brightness (1–50%): The lowest brightness that auto brightness uses. This entity is only available when the device reports support for it.

Event entities

Event entities (generation 1)

If the BUTTON TYPE of the switch connected to the device is set to Momentary or Detached Switch, the integration creates an event entity for this switch. You can use this entity in your automations.

Event entities (generation 2+)

If the Input Mode of the switch connected to the device is set to Button, the integration creates an event entity for this switch. You can use this entity in your automations.

Each script which generates events using Shelly.emitEvent() also gets an corresponding event entity. This entity is disabled by default. After changing a script, it’s required to manually reload the device before new event types show up.

Note

To avoid increased startup time, only the first 5 KB of the script is downloaded and analyzed. If your script exceeds 5 KB, place the event emitting function at the beginning to ensure it is processed.

For example, the following script will emit an event every time an input (button or switch) on the device is changed.

// Example shelly script
function eventHandler(event, userdata) {
  if (
    typeof event.component === "string" &&
    event.component.substring(0, 5) === "input"
  ) {
    let id = Number(event.component.substring(6));
    Shelly.emitEvent("input_event", { id: id });
  }
}
Shelly.addEventHandler(eventHandler);

Events

The integration fires events under the type shelly.click when the switch is used if:

  • The BUTTON TYPE of the switch connected to the device is set to Momentary or Detached Switch – for generation 1 devices.
  • The Input Mode of the switch connected to the device is set to Button – for generation 2+ devices.

You can use these events in your automations.

Also, some devices do not add an entity for the button/switch. For example, the Shelly Button1 has only one entity for the battery level. It does not have an entity for the button itself. To trigger automations based on button presses, use the shelly.click event.

Listening for events

You can subscribe to the shelly.click event type in the Events tab of Tools to examine the event data JSON for the correct parameters to use in your automations. For example, shelly.click returns event data JSON similar to the following when you press the Shelly Button1.

Event 0 fired 9:53 AM:
{
    "event_type": "shelly.click",
    "data": {
        "device_id": "e09c64a22553484d804353ef97f6fcd6",
        "device": "shellybutton1-A4C12A45174",
        "channel": 1,
        "click_type": "single",
        "generation": 1
    },
    "origin": "LOCAL",
    "time_fired": "2021-04-28T08:53:12.755729+00:00",
    "context": {
        "id": "e0f379706563aaa0c2c1fda5174b5a0e",
        "parent_id": null,
        "user_id": null
    }
}

The generation value indicates the generation of the device that is the source of the event.

Automations

The simplest way to create automations is to use the Home Assistant automation editor. For example, to set an automation triggered by a double press of a particular Shelly Button1:

  1. In the Triggers section of the automation, set Trigger Type to Device.
  2. In the Device dropdown menu. find the Shelly Button1.
  3. In the Trigger dropdown menu, select Button double clicked.
  4. Set any conditions and actions to complete your automation.

You can also create automations using YAML, for example:

- alias: "Toggle living room light"
  triggers:
    - trigger: event
      event_type: shelly.click
      event_data:
        device: shellyswitch25-AABBCC
        channel: 1
        click_type: single
  actions:
    - action: light.toggle
      target:
        entity_id: light.living_room

- alias: "Toggle living room lamp"
  triggers:
    - trigger: event
      event_type: shelly.click
      event_data:
        device: shellyswitch25-AABBCC
        channel: 2
        click_type: long
  actions:
    - action: light.toggle
      target:
        entity_id: light.lamp_living_room

Possible values for click_type

Shelly input event Click Type
S single
SS double
SSS triple
L long
SL single_long
LS long_single

Generation 2 and 3 devices use the values btn_down, btn_up, single_push, double_push, triple_push and long_push as click_type.

Note

Not all devices support all input events. You can check on Shelly API Reference website what types of Shelly input events your device supports.

Appliance type (generation 1)

Shelly device relays are added to Home Assistant by default as switch entities. A relay can be added as a light entity if Settings >> APPLIANCE TYPE value in the WebUI of the device is set to light.

Consumption type (generation 2+)

Shelly device relays are added to Home Assistant by default as switch entities. A relay can be added as a light entity if EXTERNAL CONSUMPTION TYPE value in the WebUI of the device is set to light.

Light transition

Shelly lights supporting light transition:

  • Shelly Bulb RGBW
  • Shelly DUO
  • Shelly Dimmer
  • Shelly Dimmer 2
  • Shelly RGBW2
  • Shelly Vintage

Note

The firmware limits the transition time to 5 seconds.

Device actions

The integration offers device actions which can be triggered by a configuration button.

OTA firmware update

Trigger device OTA firmware update.

Update entities

  • Firmware update
    • triggers the OTA firmware update process to the latest stable version
  • Beta firmware update (disabled by default)
    • triggers the OTA firmware update process to the latest beta version

Reboot

Trigger reboot of device.

Buttons

  • Reboot
    • triggers the reboot

List of actions

The Shelly integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following actions. Each link below opens a dedicated page with examples, parameters, and a step-by-step UI walkthrough.

  • Send command (shelly.command, can return data) Sends a command to a Shelly device and returns the device’s response.

  • Get Shelly KVS value (shelly.get_kvs_value, returns data) Reads a value from a Shelly device’s Key-Value Storage.

  • Set cover position and tilt (shelly.set_cover_position_and_tilt) Move a Shelly cover to a target position and tilt with a single command.

  • Set Shelly KVS value (shelly.set_kvs_value) Stores a value in a Shelly device’s Key-Value Storage.

For an overview of every action across all integrations, see the actions reference.

Shelly Camera

The integration creates one camera entity for each available stream. Stream 1 is disabled by default.

The integration uses RTSP streams. To use them, enable RTSP Streaming in the device’s web panel under Camera > Settings.

Browsing recordings and snapshots

You can browse the recordings and snapshots saved on the camera’s storage in the Home Assistant media browser, and play or view them from there.

  1. In the sidebar, go to Media.
  2. Select Shelly, and then select your camera.
  3. Select a video or an image to play or view it. To view it in your browser, select Web browser as the player. For more details, refer to Browsing your media.

Each camera appears as a folder named after the device. A camera is only listed while the device reports its storage (for example, a microSD card) as mounted and ready.

The folder lists videos (recordings) and images (snapshots), with the newest first. It shows up to the 500 most recent items, with a thumbnail when the device provides one.

Each item title shows the date and time in the Home Assistant time zone, the trigger event reported by the device, and the duration in seconds when the device reports one. For example, 2025-06-15 15:13:40 - motion_detected - 5s. Items without a trigger show manual.

If Home Assistant cannot read the storage, the media browser shows the error “Storage unavailable for” followed by the device name.

Shelly Circuit Breaker

The Shelly Circuit Breaker creates a switch entity that lets you control the breaker. This entity shows as unavailable when the device’s safety switch is locked.

The integration also creates two binary sensors:

  • Safety switch lock state. When locked, the device can’t be controlled remotely.
  • Output state.

Shelly IR Controller Gen4

The Shelly IR Controller Gen4 sends infrared (IR) signals to control appliances such as TVs, air conditioners, and audio systems. It can also learn IR codes from your existing handheld remotes.

IR devices and IR codes

In the Shelly app or the web interface of the device, you can add IR devices, such as a TV, and store IR codes for each of them. The integration creates a child device for every IR device, and a button entity for every IR code stored for that IR device. Pressing the button sends the IR code to your appliance.

When you add, rename, or remove IR devices or IR codes on the Shelly device, Home Assistant updates the child devices and buttons automatically.

Infrared entities

The integration also creates infrared entities for the Shelly IR Controller Gen4:

  • Infrared emitter: Allows other integrations to send IR commands through the Shelly device.
  • Infrared receiver: Allows other integrations to receive IR signals picked up by the Shelly device, for example from a handheld remote.

With these entities, you can use the Shelly IR Controller Gen4 as an infrared remote adapter for integrations that control infrared devices, such as LG Infrared or Samsung Infrared. For more details, refer to the Infrared integration.

The Infrared receiver entity is only created when RAW receive is enabled on the Shelly device. If RAW receive is disabled and the device runs up-to-date firmware, Home Assistant shows a repair issue for the device. To enable RAW receive from Home Assistant, open the repair issue and select Enable RAW receive.

Shelly Thermostatic Radiator Valve (TRV)

Shelly TRV generates 2 entities that can be used to control the device behavior: climate and number. The first will allow specifying a temperature, the second instead of a percentage of the valve position.

Note: that if you change the valve position then automatic temperature control will be disabled. As soon as you change the temperature, it gets enabled again.

Shelly Gas with Valve add-on

If you have the Valve add-on connected to Shelly Gas, the integration will create two entities for the valve. The valve entity allows you to control the valve, the sensor entity shows exact states of the valve.

CoAP port (generation 1)

In some cases, it may be needed to customize the CoAP UDP port (default: 5683) your Home Assistant instance is listening to.

To change it, add the following key to your configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more]:

# Example configuration.yaml entry
shelly:
  coap_port: 12345

Virtual components

Shelly generation 2 devices (Pro models with firmware 1.4.0 or later) and generation 3 devices (with firmware 1.2.0 or later) allow the creation of virtual components. Virtual components are a special set of components that do not initially exist on the device and are dynamically created by the user to interact with Shelly scripts. You can add virtual components to the device configuration in the Components section in the device’s web panel.

The integration supports the following virtual components:

  • boolean in toggle mode, for which a switch platform entity is created
  • boolean in label mode, for which a binary_sensor platform entity is created
  • button in button mode, for which a button platform entity is created
  • enum in dropdown mode, for which a select platform entity is created
  • enum in label mode, for which a sensor platform entity is created
  • number in field mode, for which a number platform entity in box mode is created
  • number in slider mode, for which a number platform entity in slider mode is created
  • number in label mode, for which a sensor platform entity is created
  • text in field mode, for which a text platform entity is created
  • text in label mode, for which a sensor platform entity is created

Scripts (generation 2+)

For each device script, the integration creates a switch entity that allows you to control the script. These entities are disabled by default.

Additional info

Shelly devices rely on SNTP for features like power measurement. Please check from the device Web UI that the configured server is reachable.

Troubleshooting

Collecting debug logs

  1. Enable debug logging.
  2. Take necessary steps/actions to replicate the issue.
  3. Disable debug logging and download logs.
Unsupported firmware

Symptom: “Unsupported firmware for device”

Home Assistant shows a repair issue named Unsupported firmware for device followed by the device name. You can find it in Settings > System > Repairs.

Description

Each Shelly model needs a minimum firmware version to work with Home Assistant, and your device runs older firmware.

  • For devices that are always online, the integration creates only the firmware update entity.
  • For battery-powered devices, the entities don’t receive new data until the firmware is updated.

Resolution

  • For devices that are always online, open the repair issue and select Submit. The device updates to the latest stable firmware. If the device does not offer an update, check that it can reach the internet, including its gateway, DNS server, and time settings, and then restart the device.
  • Battery-powered devices sleep most of the time, so Home Assistant cannot start the update for them. Update the firmware from the Shelly app or the device’s web interface.

After the device runs supported firmware, the integration finishes setting up the device automatically and creates all entities. You don’t need to do anything else.

Known issues and limitations

  • Only supports firmware 1.9 and later for generation 1 devices
  • Only supports firmware 1.0 and later for generation 2 devices
  • The following generation 1 devices only support firmware 1.11 and later (due to incompatible API):
    • Shelly DUO
    • Shelly Bulb RGBW
    • Shelly Dimmer
    • Shelly Dimmer 2
    • Shelly RGBW2
    • Shelly Vintage
  • Generation 1 Shelly 4Pro and Shelly Sense are not supported (devices based on old CoAP v1 protocol).
  • Shelly AZ H&T is not supported (the device does not support Outbound WebSocket, which is required for real-time communication with the integration).
  • Before set up, battery-powered devices must be woken up by pressing the button on the device.
  • For battery-powered devices, the update platform entities only inform about the availability of firmware updates but are not able to trigger the update process.
  • Using the homeassistant.update_entity action for an entity belonging to a battery-powered device is not possible because most of the time these devices are sleeping (are offline).

Removing the integration

This integration follows standard integration removal, no extra steps are required.

To remove an integration instance from Home Assistant

  1. Go to Settings > Devices & services and select the integration card.
  2. Next to the entry you want to remove, select the three dots menu. Then, select Delete.
    • Depending on the integration, the entries are listed under one of the following headings:
      • Devices
      • Hubs
      • Services
      • Integration entries
  3. To confirm, select Delete.
    • Home Assistant also deletes the devices and entities of the entry.
  4. If Home Assistant asks you to restart, restart Home Assistant.
  5. If Home Assistant asks whether to also delete the application credentials, select Remove or Keep.