Skip to content

Commit

Permalink
v2024.5.2 fix #376
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenterheerdt committed May 24, 2024
1 parent b442691 commit 9cd8957
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions custom_components/smart_irrigation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_ELEVATION, CONF_LATITUDE, CONF_LONGITUDE
from homeassistant.core import HomeAssistant, asyncio, callback
from homeassistant.helpers import config_validation as cv, device_registry as dr
from homeassistant.helpers import (
config_validation as cv,
device_registry as dr,
entity_registry as er,
)
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
Expand Down Expand Up @@ -1443,7 +1447,7 @@ async def async_get_all_modules(self):
return res

async def async_remove_entity(self, zone_id: str):
entity_registry = self.hass.helpers.entity_registry.async_get(self.hass)
entity_registry = er.async_get(self.hass)
zone_id = int(zone_id)
entity = self.hass.data[const.DOMAIN]["zones"][zone_id]
entity_registry.async_remove(entity.entity_id)
Expand Down

0 comments on commit 9cd8957

Please sign in to comment.