diff --git a/.env.intel b/.env.intel
index 6a8c181..c7dea36 100644
--- a/.env.intel
+++ b/.env.intel
@@ -8,6 +8,7 @@
 VUE_APP_VIRTUAL_MEDIA_LIST_ENABLED="true"
 VUE_APP_EVENT_LOGS_DELETE_BUTTON_DISABLED="true"
 VUE_APP_EVENT_LOGS_TOGGLE_BUTTON_DISABLED="true"
+VUE_APP_FAN_DATA_FROM_THERMAL_SUBSYSTEM="true"
 CUSTOM_STYLES="true"
 CUSTOM_APP_NAV="true"
 CUSTOM_STORE="true"
diff --git a/src/store/modules/HardwareStatus/FanStore.js b/src/store/modules/HardwareStatus/FanStore.js
index 3f172d2..832ef63 100644
--- a/src/store/modules/HardwareStatus/FanStore.js
+++ b/src/store/modules/HardwareStatus/FanStore.js
@@ -11,29 +11,49 @@
   mutations: {
     setFanInfo: (state, data) => {
       state.fans = data.map((fan) => {
-        const {
-          IndicatorLED,
-          Location,
-          MemberId,
-          Name,
-          Reading,
-          ReadingUnits,
-          Status = {},
-          PartNumber,
-          SerialNumber,
-        } = fan;
-        return {
-          id: MemberId,
-          health: Status.Health,
-          partNumber: PartNumber,
-          serialNumber: SerialNumber,
-          healthRollup: Status.HealthRollup,
-          identifyLed: IndicatorLED,
-          locationNumber: Location,
-          name: Name,
-          speed: Reading + ' ' + ReadingUnits,
-          statusState: Status.State,
-        };
+        const ThermalSubsystem =
+          process.env.VUE_APP_FAN_DATA_FROM_THERMAL_SUBSYSTEM === 'true'
+            ? true
+            : false;
+        if (ThermalSubsystem) {
+          const {
+            Id,
+            Name,
+            PartNumber,
+            SerialNumber,
+            SpeedPercent = {},
+            Status = {},
+          } = fan;
+          return {
+            id: Id,
+            health: Status.Health,
+            name: Name,
+            speed: SpeedPercent.Reading,
+            statusState: Status.State,
+            healthRollup: Status.HealthRollup,
+            partNumber: PartNumber,
+            serialNumber: SerialNumber,
+          };
+        } else {
+          const {
+            MemberId,
+            Name,
+            Reading,
+            Status = {},
+            PartNumber,
+            SerialNumber,
+          } = fan;
+          return {
+            id: MemberId,
+            health: Status.Health,
+            partNumber: PartNumber,
+            serialNumber: SerialNumber,
+            healthRollup: Status.HealthRollup,
+            name: Name,
+            speed: Reading,
+            statusState: Status.State,
+          };
+        }
       });
     },
   },
@@ -59,10 +79,35 @@
         .catch((error) => console.log(error));
     },
     async getChassisFans(_, chassis) {
-      return await api
-        .get(chassis.Thermal['@odata.id'])
-        .then(({ data: { Fans } }) => Fans || [])
-        .catch((error) => console.log(error));
+      const ThermalSubsystem =
+        process.env.VUE_APP_FAN_DATA_FROM_THERMAL_SUBSYSTEM === 'true'
+          ? true
+          : false;
+      if (ThermalSubsystem) {
+        return await api
+          .get(chassis.ThermalSubsystem['@odata.id'])
+          .then((response) => {
+            return api.get(`${response.data.Fans['@odata.id']}`);
+          })
+          .then(({ data: { Members } }) => {
+            const promises = Members.map((member) =>
+              api.get(member['@odata.id'])
+            );
+            return api.all(promises);
+          })
+          .then((response) => {
+            const data = response.map(({ data }) => data);
+            return data;
+          })
+          .catch((error) => console.log(error));
+      } else {
+        return await api
+          .get(chassis.Thermal['@odata.id'])
+          .then(({ data: { Fans } }) => {
+            return Fans || [];
+          })
+          .catch((error) => console.log(error));
+      }
     },
   },
 };
