Przeglądaj źródła

Deprecate YAML configuration.

Soon work will start on improving the config flow.  I do not want to be
held back by legacy config format issues, so deprecating YAML now.
It is already imported since before the start of the fork, but currently
does not allow reconfiguration of imported config, and picks up changes
from yaml config.

Next step will be to ignore yaml config, and allow previously imported
config to be modified from the options flow.  After that, migrations will
not be blocked by the need to keep importing the legacy yaml config.
Jason Rumney 4 lat temu
rodzic
commit
05beccc7f0
2 zmienionych plików z 6 dodań i 2 usunięć
  1. 2 1
      README.md
  2. 4 1
      custom_components/tuya_local/__init__.py

+ 2 - 1
README.md

@@ -31,6 +31,7 @@ Note that devices sometimes get firmware upgrades, or incompatible versions are
 
 #### Fans
 - Goldair GCPF315 fans
+- Anko HEGSM40 fans
 
 #### Dehumidifiers
 - Goldair GPDH420 dehumidifiers
@@ -80,7 +81,7 @@ You can easily configure your devices using the Integrations UI at `Home Assista
 
 #### type
 
-    _(string) (Optional)_ The type of Tuya device. `auto` to automatically detect the device type, or if that doesn't work, select from the available options `heater`, `geco_heater` `gpcv_heater`, `dehumidifier`, `fan`, `kogan_heater`, `gsh_heater`, `eurom_heater`, `gardenpac_heatpump`, `purline_m100_heater`, `remora_heatpump`,  or `kogan_switch`.  Note that the type is likely to change in future to be a configuration file name or product id, as the hardcoded list is a maintenance burden.
+    _(string) (Optional)_ The type of Tuya device. `auto` to automatically detect the device type, or if that doesn't work, select from the available options.
 
 #### climate
 

+ 4 - 1
custom_components/tuya_local/__init__.py

@@ -29,7 +29,10 @@ from .device import setup_device, delete_device
 _LOGGER = logging.getLogger(__name__)
 
 CONFIG_SCHEMA = vol.Schema(
-    {DOMAIN: vol.All(cv.ensure_list, [vol.Schema(individual_config_schema())])},
+    vol.All(
+        cv.deprecated(DOMAIN),
+        {DOMAIN: vol.All(cv.ensure_list, [vol.Schema(individual_config_schema())])},
+    ),
     extra=vol.ALLOW_EXTRA,
 )