diff --git a/custom_components/httpsispmctl/switch.py b/custom_components/httpsispmctl/switch.py index dbc8acc..be45b73 100644 --- a/custom_components/httpsispmctl/switch.py +++ b/custom_components/httpsispmctl/switch.py @@ -49,20 +49,21 @@ class SispmctlHost: async with self._session.get(url, timeout=3) as resp: if resp.status == 200: result = await resp.json() - await self.notify_switches(result) + #await self.notify_switches(result) else: await self.set_switches_unreachable() except ClientConnectionError: await self.set_switches_unreachable() async def update_state(self): - url = f"http://{self.hostname}:{self.port}" - async with self._session.get(url, timeout=3) as resp: - if resp.status == 200: - result = await resp.json() - await self.notify_switches(result) - else: - await self.set_switches_unreachable() + pass + #url = f"http://{self.hostname}:{self.port}" + #async with self._session.get(url, timeout=3) as resp: + # if resp.status == 200: + # result = await resp.json() + # await self.notify_switches(result) + # else: + # await self.set_switches_unreachable() async def notify_switches(self, response): for i, switch in enumerate(self._switch_objects):