schemas: legacy: extract AspeedFan

This allows to remove some properties from 'Aggregate' schema which are
no longer needed, since there is now a more specific schema to use.

Tested: Schema Validator Pass

Change-Id: I21f469a287fe361e90f103025eaf493df80bdfb2
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/schemas/global.json b/schemas/global.json
index c1b618d..1ce2c09 100644
--- a/schemas/global.json
+++ b/schemas/global.json
@@ -55,6 +55,9 @@
                             "$ref": "legacy.json#/$defs/ChassisIntrusionSensor"
                         },
                         {
+                            "$ref": "legacy.json#/$defs/AspeedFan"
+                        },
+                        {
                             "$ref": "virtual_sensor.json#/$defs/VirtualSensor"
                         },
                         {
diff --git a/schemas/legacy.json b/schemas/legacy.json
index 5567309..db4b4d9 100644
--- a/schemas/legacy.json
+++ b/schemas/legacy.json
@@ -142,6 +142,47 @@
             "required": ["Name", "Type", "Class"],
             "type": "object"
         },
+        "AspeedFan": {
+            "additionalProperties": false,
+            "properties": {
+                "BindConnector": {
+                    "$ref": "#/$defs/Types/BindConnector"
+                },
+                "Index": {
+                    "$ref": "#/$defs/Types/Index"
+                },
+                "PowerState": {
+                    "$ref": "#/$defs/Types/PowerState"
+                },
+                "Connector": {
+                    "$ref": "#/$defs/Types/Connector"
+                },
+                "EntityId": {
+                    "$ref": "#/$defs/Types/EntityId"
+                },
+                "EntityInstance": {
+                    "$ref": "#/$defs/Types/EntityInstance"
+                },
+                "Presence": {
+                    "$ref": "#/$defs/Types/Presence"
+                },
+                "MaxReading": {
+                    "$ref": "#/$defs/Types/MaxReading"
+                },
+                "Thresholds": {
+                    "$ref": "#/$defs/Types/Thresholds"
+                },
+                "Name": {
+                    "$ref": "#/$defs/Types/Name"
+                },
+                "Type": {
+                    "type": "string",
+                    "const": "AspeedFan"
+                }
+            },
+            "required": ["Name", "Type"],
+            "type": "object"
+        },
         "Aggregate": {
             "description": "Don't add additional properties to this schema. Consult README.schema for instructions on adding new Exposes element sub-schema.",
             "additionalProperties": false,
@@ -593,7 +634,6 @@
                     "TMP464",
                     "I2CFan",
                     "NuvotonFan",
-                    "AspeedFan",
                     "ADC",
                     "NCT7802",
                     "NCT6779",