Skip to content

Commit

Permalink
Bug fix for coaxial control check
Browse files Browse the repository at this point in the history
  • Loading branch information
rroller committed Jul 7, 2021
1 parent 24f28f6 commit 9350c06
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/dahua/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from datetime import timedelta

from aiohttp import ClientError
from aiohttp import ClientError, ClientResponseError
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import CALLBACK_TYPE, Config, HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
Expand Down Expand Up @@ -182,8 +182,9 @@ async def _async_update_data(self):
self._serial_number = data.get("serialNumber")

try:
await self.client.async_get_coaxial_control_io_status()
self._supports_coaxial_control = True
except ConnectionError as exception:
except ClientResponseError as exception:
self._supports_coaxial_control = False

try:
Expand Down

0 comments on commit 9350c06

Please sign in to comment.