Request DPS 1-150 in config flow

This commit is contained in:
Pierre Ståhl
2020-09-15 19:24:58 +02:00
committed by rospogrigio
parent 9d917fe325
commit 0290b11dae

View File

@@ -78,7 +78,7 @@ async def validate_input(hass: core.HomeAssistant, data):
data[CONF_LOCAL_KEY],
)
pytuyadevice.set_version(float(data[CONF_PROTOCOL_VERSION]))
pytuyadevice.set_dpsUsed({})
pytuyadevice.set_dpsUsed({str(dps): None for dps in range(1, 151)})
try:
data = await hass.async_add_executor_job(pytuyadevice.status)
except (ConnectionRefusedError, ConnectionResetError):