Skip to content

Commit 7ca15da

Browse files
committed
Remove unused semaphore
1 parent 94825c2 commit 7ca15da

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

custom_components/opensurplusmanager/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44

55
import asyncio
66

7-
from pyosmanager import OSMClient
8-
97
from homeassistant.const import Platform
108
from homeassistant.core import HomeAssistant
9+
from pyosmanager import OSMClient
1110

12-
from .const import DOMAIN, SEMAPHORE
1311
from .coordinator import OSMConfigEntry, OSMCoordinator
1412
from .core import OSMCore
1513
from .device import OSMDevice
@@ -19,9 +17,6 @@
1917

2018
async def async_setup_entry(hass: HomeAssistant, entry: OSMConfigEntry) -> bool:
2119
"""Set up Open Surplus Manager from a config entry."""
22-
if SEMAPHORE not in hass.data.setdefault(DOMAIN, {}):
23-
hass.data.setdefault(DOMAIN, {})[SEMAPHORE] = asyncio.Semaphore(1)
24-
client = OSMClient(entry.data["host"])
2520

2621
result = await client.is_healthy()
2722
if not result:

0 commit comments

Comments
 (0)