Use generic Device in config flow

This commit is contained in:
Pierre Ståhl
2020-09-09 23:06:28 +02:00
parent 7efb3024fb
commit 11763d90c5

View File

@@ -72,7 +72,7 @@ def strip_dps_values(user_input, dps_strings):
async def validate_input(hass: core.HomeAssistant, data):
"""Validate the user input allows us to connect."""
pytuyadevice = pytuya.OutletDevice(
pytuyadevice = pytuya.Device(
data[CONF_DEVICE_ID], data[CONF_HOST], data[CONF_LOCAL_KEY]
)
pytuyadevice.set_version(float(data[CONF_PROTOCOL_VERSION]))