Explorar o código

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 %!s(int64=3) %!d(string=hai) anos
pai
achega
d4fbb5d59e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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}