Procházet zdrojové kódy

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 před 3 roky
rodič
revize
d4fbb5d59e
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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}