|
87 | 87 | "description": "List of sensors on this I2C component.",
|
88 | 88 | "type": "array",
|
89 | 89 | "items": { "$ref": "#/$defs/subcomponent" }
|
| 90 | + }, |
| 91 | + "customProperties": { |
| 92 | + "description": "A list of custom properties that this component supports.", |
| 93 | + "type": "array", |
| 94 | + "items": { |
| 95 | + "type": "object", |
| 96 | + "required": [ "name", "type", "description", "default", "displayed" ], |
| 97 | + "properties": { |
| 98 | + "name": { |
| 99 | + "description": "The name and key of the custom property.", |
| 100 | + "type": "string", |
| 101 | + "minLength": 3, |
| 102 | + "maxLength": 24 |
| 103 | + }, |
| 104 | + "type": { |
| 105 | + "description": "The type of the custom property.", |
| 106 | + "type": "string", |
| 107 | + "pattern": "^(color|string|number|boolean|range|list)$" |
| 108 | + }, |
| 109 | + "description": { |
| 110 | + "description": "A brief description of the custom property.", |
| 111 | + "type": "string", |
| 112 | + "minLength": 3, |
| 113 | + "maxLength": 255 |
| 114 | + }, |
| 115 | + "default": { |
| 116 | + "description": "The default value of the custom property.", |
| 117 | + "type": ["string", "number", "boolean"] |
| 118 | + }, |
| 119 | + "displayed": { |
| 120 | + "description": "If true, this custom property will be displayed in the UI.", |
| 121 | + "type": "boolean" |
| 122 | + }, |
| 123 | + "displayName": { |
| 124 | + "description": "The human-friendly name of this custom property.", |
| 125 | + "type": "string", |
| 126 | + "minLength": 3, |
| 127 | + "maxLength": 150 |
| 128 | + }, |
| 129 | + "displayOptions": { |
| 130 | + "description": "Options or values for the custom property.", |
| 131 | + "type": "object", |
| 132 | + "optionalProperties": { |
| 133 | + "min": { "type": "number" }, |
| 134 | + "max": { "type": "number" }, |
| 135 | + "step": { "type": "number" }, |
| 136 | + "values": { |
| 137 | + "type": "array", |
| 138 | + "items": { |
| 139 | + "type": "object", |
| 140 | + "required": [ "key", "displayText" ] |
| 141 | + } |
| 142 | + } |
| 143 | + } |
| 144 | + } |
| 145 | + } |
90 | 146 | }
|
91 | 147 | }
|
92 | 148 | }
|
0 commit comments