From 80fba6d9f3eb4ff724dbf10381f017e44fb28626 Mon Sep 17 00:00:00 2001 From: Alex Albu Date: Sat, 8 Apr 2023 09:18:32 +0300 Subject: [PATCH] Add is_connecting property to TuyaDevice --- custom_components/localtuya/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/localtuya/common.py b/custom_components/localtuya/common.py index 244f00008..96b99d9cd 100644 --- a/custom_components/localtuya/common.py +++ b/custom_components/localtuya/common.py @@ -152,6 +152,11 @@ def __init__(self, hass, config_entry): # This has to be done in case the device type is type_0d for entity in config_entry[CONF_ENTITIES]: self.dps_to_request[entity[CONF_ID]] = None + + @property + def is_connecting(self): + """Return whether device is currently connecting.""" + return self._connect_task is not None @property def connected(self):