Просмотр исходного кода

cleanup(device_config): remove name from product schema

This has never been implemented, and now that AI is creating configs properly
based on the json schema, it just serves to add unnecessary noise to
the configs.
Jason Rumney 8 часов назад
Родитель
Сommit
860df4ffc2

+ 1 - 3
custom_components/tuya_local/devices/README.md

@@ -28,9 +28,7 @@ recommended that listings are created for both.
 In addition to the id, the `manufacturer`, `model` and `model_id` (if
 the model has both a name and a more code like id) can be listed here.
 In future the intention is to display these in the Device info panel
-for the device. The `name` can also be overridden here with a more
-specific name to be used in future in place of the generic name at the
-top of the config.
+for the device.
 
 ### `entities`
 

+ 0 - 4
custom_components/tuya_local/devices/device_config_schema.json

@@ -30,10 +30,6 @@
                     "model_id": {
                         "type": "string",
                         "description": "Optional model identifier for the device if it has both a readable name and a cryptic id."
-                    },
-                    "name": {
-                        "type": "string",
-                        "description": "Optional name to override the device name."
                     }
                 },
                 "required": ["id"],

+ 0 - 1
tests/test_device_config.py

@@ -28,7 +28,6 @@ PRODUCT_SCHEMA = vol.Schema(
         # Bluetooth and Zigbee devices have 8 character product ids
         # WiFi devices have 16 character product ids
         vol.Required("id"): vol.All(str, vol.Length(min=8, max=16)),
-        vol.Optional("name"): str,
         vol.Optional("manufacturer"): str,
         vol.Optional("model"): str,
         vol.Optional("model_id"): str,