diff --git a/homeassistant/components/overkiz/coordinator.py b/homeassistant/components/overkiz/coordinator.py index cbf83a90963..98031926cfd 100644 --- a/homeassistant/components/overkiz/coordinator.py +++ b/homeassistant/components/overkiz/coordinator.py @@ -6,7 +6,7 @@ import logging from aiohttp import ServerDisconnectedError from pyoverkiz.client import OverkizClient -from pyoverkiz.enums import EventName, ExecutionState +from pyoverkiz.enums import EventName, ExecutionState, Protocol from pyoverkiz.exceptions import ( BadCredentialsException, InvalidEventListenerIdException, @@ -55,9 +55,7 @@ class OverkizDataUpdateCoordinator(DataUpdateCoordinator[dict[str, Device]]): self.client = client self.devices: dict[str, Device] = {d.device_url: d for d in devices} self.is_stateless = all( - device.device_url.startswith("rts://") - or device.device_url.startswith("internal://") - for device in devices + device.protocol in (Protocol.RTS, Protocol.INTERNAL) for device in devices ) self.executions: dict[str, dict[str, str]] = {} self.areas = self._places_to_area(places) diff --git a/homeassistant/components/overkiz/executor.py b/homeassistant/components/overkiz/executor.py index c362969abf2..cd39afd9696 100644 --- a/homeassistant/components/overkiz/executor.py +++ b/homeassistant/components/overkiz/executor.py @@ -8,7 +8,6 @@ from pyoverkiz.enums.command import OverkizCommand from pyoverkiz.models import Command, Device from pyoverkiz.types import StateType as OverkizStateType -from .const import LOGGER from .coordinator import OverkizDataUpdateCoordinator @@ -59,15 +58,11 @@ class OverkizExecutor: async def async_execute_command(self, command_name: str, *args: Any) -> None: """Execute device command in async context.""" - try: - exec_id = await self.coordinator.client.execute_command( - self.device.device_url, - Command(command_name, list(args)), - "Home Assistant", - ) - except Exception as exception: # pylint: disable=broad-except - LOGGER.error(exception) - return + exec_id = await self.coordinator.client.execute_command( + self.device.device_url, + Command(command_name, list(args)), + "Home Assistant", + ) # ExecutionRegisteredEvent doesn't contain the device_url, thus we need to register it here self.coordinator.executions[exec_id] = {