From d525c294869855786fa329a8a52ba9f8849148fc Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 28 Aug 2023 09:38:25 -0500 Subject: [PATCH] Switch w800rf32 to use async_call_later This was using async_track_point_in_time when it did not need to as it just needs to be called later --- homeassistant/components/w800rf32/binary_sensor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/w800rf32/binary_sensor.py b/homeassistant/components/w800rf32/binary_sensor.py index 6d1ce5c61c0ef7..2bc0c0eea75cc5 100644 --- a/homeassistant/components/w800rf32/binary_sensor.py +++ b/homeassistant/components/w800rf32/binary_sensor.py @@ -17,7 +17,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType -from homeassistant.util import dt as dt_util from . import W800RF32_DEVICE @@ -127,8 +126,8 @@ def binary_sensor_update(self, event): self.update_state(is_on) if self.is_on and self._off_delay is not None and self._delay_listener is None: - self._delay_listener = evt.async_track_point_in_time( - self.hass, self._off_delay_listener, dt_util.utcnow() + self._off_delay + self._delay_listener = evt.async_call_later( + self.hass, self._off_delay, self._off_delay_listener ) def update_state(self, state):