mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix Non-thread-safe operation in rflink binary_sensor (#62286)
This commit is contained in:
parent
b05149fc28
commit
4dc70536b6
@ -12,6 +12,7 @@ from homeassistant.const import (
|
|||||||
CONF_FORCE_UPDATE,
|
CONF_FORCE_UPDATE,
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
)
|
)
|
||||||
|
from homeassistant.core import callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
import homeassistant.helpers.event as evt
|
import homeassistant.helpers.event as evt
|
||||||
|
|
||||||
@ -81,6 +82,7 @@ class RflinkBinarySensor(RflinkDevice, BinarySensorEntity):
|
|||||||
|
|
||||||
if self._state and self._off_delay is not None:
|
if self._state and self._off_delay is not None:
|
||||||
|
|
||||||
|
@callback
|
||||||
def off_delay_listener(now):
|
def off_delay_listener(now):
|
||||||
"""Switch device off after a delay."""
|
"""Switch device off after a delay."""
|
||||||
self._delay_listener = None
|
self._delay_listener = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user