From 4dc70536b6b15bd4c919ab0b9475b2fa7e87378e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 18 Dec 2021 17:14:41 -0600 Subject: [PATCH] Fix Non-thread-safe operation in rflink binary_sensor (#62286) --- homeassistant/components/rflink/binary_sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/rflink/binary_sensor.py b/homeassistant/components/rflink/binary_sensor.py index 77a8a522f65..82457bd767e 100644 --- a/homeassistant/components/rflink/binary_sensor.py +++ b/homeassistant/components/rflink/binary_sensor.py @@ -12,6 +12,7 @@ from homeassistant.const import ( CONF_FORCE_UPDATE, CONF_NAME, ) +from homeassistant.core import callback import homeassistant.helpers.config_validation as cv import homeassistant.helpers.event as evt @@ -81,6 +82,7 @@ class RflinkBinarySensor(RflinkDevice, BinarySensorEntity): if self._state and self._off_delay is not None: + @callback def off_delay_listener(now): """Switch device off after a delay.""" self._delay_listener = None