From 0e94b681db696a2deb5e376b7535ea802808c5b9 Mon Sep 17 00:00:00 2001 From: rospogrigio Date: Mon, 14 Sep 2020 20:44:55 +0200 Subject: [PATCH 1/2] Fixed import from YAML in config_flow.py --- custom_components/localtuya/config_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/localtuya/config_flow.py b/custom_components/localtuya/config_flow.py index eca5e1b..737153c 100644 --- a/custom_components/localtuya/config_flow.py +++ b/custom_components/localtuya/config_flow.py @@ -178,7 +178,7 @@ class LocaltuyaConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return converted await self.async_set_unique_id(user_input[CONF_DEVICE_ID]) - self._set_platform(user_input[CONF_PLATFORM], []) + self._set_platform(user_input[CONF_PLATFORM]) if len(user_input.get(CONF_SWITCHES, [])) > 0: for switch_conf in user_input[CONF_SWITCHES].values(): From 285bffdc680baa24651104ba35492c471932fbe1 Mon Sep 17 00:00:00 2001 From: rospogrigio Date: Mon, 14 Sep 2020 20:57:50 +0200 Subject: [PATCH 2/2] Fixed async_setup_entry in cover.py --- custom_components/localtuya/cover.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/custom_components/localtuya/cover.py b/custom_components/localtuya/cover.py index cd2a845..abeb170 100644 --- a/custom_components/localtuya/cover.py +++ b/custom_components/localtuya/cover.py @@ -76,8 +76,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities): # TODO: keeping for now but should be removed dps = {} - dps[config.get(CONF_ID)]=None - pytuyadevice.set_dpsUsed(dps) covers = [] for device_config in entities_to_setup: