From acd70b655c2ce21ea3ecfef26f9448aa98a47317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20St=C3=A5hl?= Date: Thu, 17 Dec 2020 14:03:40 +0100 Subject: [PATCH] Fix name issue from pylint changes (#252) --- custom_components/localtuya/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/localtuya/common.py b/custom_components/localtuya/common.py index 05bd49c65..e158f6998 100644 --- a/custom_components/localtuya/common.py +++ b/custom_components/localtuya/common.py @@ -65,7 +65,7 @@ async def async_setup_entry( # Add DPS used by this platform to the request list for dp_conf in dps_config_fields: if dp_conf in device_config: - tuyainterface.add_dps_to_request(device_config[dp_conf]) + tuyainterface.dps_to_request[device_config[dp_conf]] = None entities.append( entity_class( @@ -113,14 +113,14 @@ def __init__(self, hass, config_entry): self._config_entry = config_entry self._interface = None self._status = {} - self._dps_to_request = {} + self.dps_to_request = {} self._is_closing = False self._connect_task = None self.set_logger(_LOGGER, config_entry[CONF_DEVICE_ID]) # 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 + self.dps_to_request[entity[CONF_ID]] = None @property def connected(self): @@ -143,7 +143,7 @@ async def _make_connection(self): float(self._config_entry[CONF_PROTOCOL_VERSION]), self, ) - self._interface.add_dps_to_request(self._dps_to_request) + self._interface.add_dps_to_request(self.dps_to_request) self.debug("Retrieving initial state") status = await self._interface.status()