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(): 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: