diff --git a/homeassistant/components/reolink/__init__.py b/homeassistant/components/reolink/__init__.py index 64cc0ab486f2..523fcf25309f 100644 --- a/homeassistant/components/reolink/__init__.py +++ b/homeassistant/components/reolink/__init__.py @@ -1,7 +1,7 @@ """Reolink integration for HomeAssistant.""" from collections.abc import Callable -from datetime import UTC, datetime, timedelta +from datetime import timedelta import logging from random import uniform from time import time @@ -26,6 +26,7 @@ from homeassistant.helpers import ( from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC from homeassistant.helpers.event import async_call_later from homeassistant.helpers.typing import ConfigType +from homeassistant.util import dt as dt_util from .const import ( BATTERY_PASSIVE_WAKE_UPDATE_INTERVAL, @@ -192,7 +193,7 @@ async def async_setup_entry( hass.config_entries.async_update_entry(config_entry, data=data) # If camera WAN blocked, firmware check fails and takes long, do not prevent setup - now = datetime.now(UTC) # pylint: disable=home-assistant-enforce-utcnow + now = dt_util.utcnow() check_time = timedelta(seconds=check_time_sec) delta_midnight = now - now.replace(hour=0, minute=0, second=0, microsecond=0) firmware_check_delay = check_time - delta_midnight