Browse Source

Default device address to Auto.

A new, undocumented feature of tinytuya is that if you give "Auto" or
None as the IP address, it will automatically search for the device
(and protocol version, but we probably override that with our own auto
detection).

Entering "Auto" seems to work without any code changes, so default to
that as a quick way to leverage this feature.
Jason Rumney 3 years ago
parent
commit
d4fbb5d59e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      custom_components/tuya_local/config_flow.py

+ 1 - 1
custom_components/tuya_local/config_flow.py

@@ -29,7 +29,7 @@ class ConfigFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
     async def async_step_user(self, user_input=None):
         errors = {}
         devid_opts = {}
-        host_opts = {}
+        host_opts = {"default": "Auto"}
         key_opts = {}
         proto_opts = {"default": "auto"}
         polling_opts = {"default": False}