Ver Fonte

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 há 3 anos atrás
pai
commit
d4fbb5d59e
1 ficheiros alterados com 1 adições e 1 exclusões
  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}