Shelly4hass and native Shelly integration

The Shelly4hass custom integration and the native shelly integration use the same domain “shelly”. This is the reason why you cannot use both at the same time.
But it is possible to move Shelly4hass to a new domain.

  • shut down homeassistant

  • in the custom_components/shelly directory change const.py
    DOMAIN = ‘shelly’ → DOMAIN = ‘shelly4h’

  • in the custom_components/shelly directory change manifest.json
    “domain”: “shelly” → “domain”: “shelly4h”,
    “name”: “Shelly” → “name”: “Shelly4hass”

  • in config_flow.py:
    return self.async_create_entry(
    title=“Shelly4hass”,
    data=system_options
    )
    and
    async def async_step_final(self):
    return self.async_create_entry(
    title=“Shelly4hass”,
    data=self._options
    )

  • in .homeassistant/.storage/core.config_entries:

    “domain”: “shelly4h”,
    and
    “title”: “Shelly4hass”,

  • in .homeassistant/.storage/core.device_registry:
    “identifiers”: [[“shelly4h”,…]]

  • in .homeassistant/.storage/core.entity_registry:
    “platform”:“shelly4”

  • in configuration.yaml:
    shelly: → shelly4h: (if you have that)

You shoud not be using ShellyForHass

ShellyForHass will no longer receive further development updates. This decision stems from the fact that its features and functionality have been seamlessly integrated into Home Assistant, making it redundant to maintain a separate plugin.

https://github.com/StyraHem/ShellyForHASS?tab=readme-ov-file#discontinuation-of-shellyforhass

Just use the core integration.

It is not possible to use the core integration while you have Shelly4hass still active. This means you have to migrate somehow from Shelly4hass to Shelly native.

  1. Delete S4H
  2. Install HA core Shelly integration.

Do you think the native Shelly integration takes over the 50 old S4H entities?
And if not, how do I know what “shelly_shem_3_d8bfc01a7fae_1_current_consumption” is that is used in 4 automations and 3 template sensors?

Yes. Why wouldn’t it?

Why the heck did you not rename your Shelly’s to something easily recognisable like mains_power?

Also you can add the Shelly devices discovered by the core integration one by one and rename them as you go. You don’t have to add them all at once.

You never migrated from Shell4hass to shelly, right?

Correct I never had the need for Shell4hass. Right from when I started using Shelly devices five years ago, back then mqtt and the HA restful integration was all that was needed for full functionality but as the core Shelly integration got better I switched over to that.