diff --git a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp
index 2fbc0aa..2151dd6 100644
--- a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp
+++ b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp
@@ -17,6 +17,7 @@
  */
 
 #include "AccountLoginManager.h"
+#include <app-common/zap-generated/attributes/Accessors.h>
 #include <app/CommandHandler.h>
 #include <app/util/af.h>
 #include <json/json.h>
@@ -102,3 +103,19 @@
     }
     ChipLogProgress(Zcl, "Returning pin for content app for endpoint %d", mEndpointId);
 };
+
+uint16_t AccountLoginManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "AccountLoginManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/android/include/account-login/AccountLoginManager.h b/examples/tv-app/android/include/account-login/AccountLoginManager.h
index a02a029..265118c 100644
--- a/examples/tv-app/android/include/account-login/AccountLoginManager.h
+++ b/examples/tv-app/android/include/account-login/AccountLoginManager.h
@@ -46,6 +46,7 @@
                            const CharSpan & tempAccountIdentifierString) override;
     void GetSetupPin(char * setupPin, size_t setupPinSize, const CharSpan & tempAccountIdentifierString) override;
     void SetEndpointId(EndpointId epId) { mEndpointId = epId; };
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
 protected:
     static const size_t kSetupPinSize = 12;
@@ -54,4 +55,6 @@
 private:
     ContentAppCommandDelegate * mCommandDelegate;
     EndpointId mEndpointId;
+
+    static constexpr uint16_t kClusterRevision = 2;
 };
diff --git a/examples/tv-app/android/include/content-control/ContentController.cpp b/examples/tv-app/android/include/content-control/ContentController.cpp
index 9937358..edf2550 100644
--- a/examples/tv-app/android/include/content-control/ContentController.cpp
+++ b/examples/tv-app/android/include/content-control/ContentController.cpp
@@ -96,7 +96,7 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
diff --git a/examples/tv-app/android/include/content-control/ContentController.h b/examples/tv-app/android/include/content-control/ContentController.h
index eaafef0..40b0636 100644
--- a/examples/tv-app/android/include/content-control/ContentController.h
+++ b/examples/tv-app/android/include/content-control/ContentController.h
@@ -58,6 +58,6 @@
 protected:
 private:
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 3;
+    static constexpr uint32_t kEndpointFeatureMap = 3;
     chip::EndpointId mEndpointId;
 };
diff --git a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp
index 50b4519..31745a9 100644
--- a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp
+++ b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp
@@ -158,10 +158,26 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
     Attributes::FeatureMap::Get(endpoint, &featureMap);
     return featureMap;
 }
+
+uint16_t AppContentLauncherManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "AppContentLauncherManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.h b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.h
index 6781274..f9e05a1 100644
--- a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.h
+++ b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.h
@@ -52,6 +52,7 @@
     void SetEndpointId(EndpointId epId) { mEndpointId = epId; };
 
     uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
 protected:
     std::list<std::string> mAcceptHeaderList;
@@ -61,7 +62,7 @@
     EndpointId mEndpointId;
 
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 3;
-
+    static constexpr uint32_t kEndpointFeatureMap = 3;
+    static constexpr uint16_t kClusterRevision    = 2;
     ContentAppAttributeDelegate * mAttributeDelegate;
 };
diff --git a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp
index c319513..39e364d 100644
--- a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp
+++ b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp
@@ -276,10 +276,26 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
     Attributes::FeatureMap::Get(endpoint, &featureMap);
     return featureMap;
 }
+
+uint16_t AppMediaPlaybackManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "AppMediaPlaybackManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.h b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.h
index 9cb1609..0c88473 100644
--- a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.h
+++ b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.h
@@ -102,6 +102,7 @@
     bool HandleDeactivateTextTrack() override;
 
     uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
     void SetEndpointId(EndpointId epId) { mEndpointId = epId; };
 
@@ -113,7 +114,8 @@
     EndpointId mEndpointId;
 
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 3;
+    static constexpr uint32_t kEndpointFeatureMap = 3;
+    static constexpr uint16_t kClusterRevision    = 2;
 
     ContentAppAttributeDelegate * mAttributeDelegate;
 };
diff --git a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp
index f917beb..cb22e9f 100644
--- a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp
+++ b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp
@@ -16,6 +16,7 @@
  */
 
 #include "TargetNavigatorManager.h"
+#include <app-common/zap-generated/attributes/Accessors.h>
 #include <json/json.h>
 
 using namespace std;
@@ -144,3 +145,19 @@
     response.status = StatusEnum::kSuccess;
     helper.Success(response);
 }
+
+uint16_t TargetNavigatorManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "TargetNavigatorManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.h b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.h
index 1f7f4a2..10db972 100644
--- a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.h
+++ b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.h
@@ -39,6 +39,7 @@
     uint8_t HandleGetCurrentTarget() override;
     void HandleNavigateTarget(CommandResponseHelper<NavigateTargetResponseType> & responser, const uint64_t & target,
                               const CharSpan & data) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
     void SetEndpointId(EndpointId epId) { mEndpointId = epId; };
 
@@ -51,4 +52,8 @@
     EndpointId mEndpointId;
 
     ContentAppAttributeDelegate * mAttributeDelegate;
+
+private:
+    // TODO: set this based upon meta data from app
+    static constexpr uint16_t kClusterRevision = 2;
 };
diff --git a/examples/tv-app/android/java/ChannelManager.cpp b/examples/tv-app/android/java/ChannelManager.cpp
index d7657fd..997f041 100644
--- a/examples/tv-app/android/java/ChannelManager.cpp
+++ b/examples/tv-app/android/java/ChannelManager.cpp
@@ -745,10 +745,26 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
     Attributes::FeatureMap::Get(endpoint, &featureMap);
     return featureMap;
 }
+
+uint16_t ChannelManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "ChannelManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/android/java/ChannelManager.h b/examples/tv-app/android/java/ChannelManager.h
index 95bf531..6d749ca 100644
--- a/examples/tv-app/android/java/ChannelManager.h
+++ b/examples/tv-app/android/java/ChannelManager.h
@@ -65,6 +65,7 @@
                                    const chip::ByteSpan & data) override;
 
     uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
 private:
     chip::JniGlobalReference mChannelManagerObject;
@@ -81,5 +82,6 @@
     jmethodID mCancelRecordProgramMethod = nullptr;
 
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 3;
+    static constexpr uint32_t kEndpointFeatureMap = 3;
+    static constexpr uint16_t kClusterRevision    = 2;
 };
diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp
index 8e8a08b..25e5659 100644
--- a/examples/tv-app/android/java/ContentLauncherManager.cpp
+++ b/examples/tv-app/android/java/ContentLauncherManager.cpp
@@ -286,3 +286,19 @@
     Attributes::FeatureMap::Get(endpoint, &featureMap);
     return featureMap;
 }
+
+uint16_t ContentLauncherManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "ContentLauncherManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/android/java/ContentLauncherManager.h b/examples/tv-app/android/java/ContentLauncherManager.h
index 864d52c..6e858dd 100644
--- a/examples/tv-app/android/java/ContentLauncherManager.h
+++ b/examples/tv-app/android/java/ContentLauncherManager.h
@@ -49,6 +49,7 @@
     uint32_t HandleGetSupportedStreamingProtocols() override;
 
     uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
 private:
     chip::JniGlobalReference mContentLauncherManagerObject;
@@ -56,4 +57,7 @@
     jmethodID mGetSupportedStreamingProtocolsMethod = nullptr;
     jmethodID mLaunchContentMethod                  = nullptr;
     jmethodID mLaunchUrlMethod                      = nullptr;
+
+    // TODO: set this based upon meta data from app
+    static constexpr uint16_t kClusterRevision = 2;
 };
diff --git a/examples/tv-app/android/java/KeypadInputManager.cpp b/examples/tv-app/android/java/KeypadInputManager.cpp
index 450804a..a43a56c 100644
--- a/examples/tv-app/android/java/KeypadInputManager.cpp
+++ b/examples/tv-app/android/java/KeypadInputManager.cpp
@@ -96,7 +96,7 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
diff --git a/examples/tv-app/android/java/KeypadInputManager.h b/examples/tv-app/android/java/KeypadInputManager.h
index 568648e..4bc8878 100644
--- a/examples/tv-app/android/java/KeypadInputManager.h
+++ b/examples/tv-app/android/java/KeypadInputManager.h
@@ -42,5 +42,5 @@
     jmethodID mSendKeyMethod = nullptr;
 
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 7;
+    static constexpr uint32_t kEndpointFeatureMap = 7;
 };
diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp
index c72a313..8da71d5 100644
--- a/examples/tv-app/android/java/MediaPlaybackManager.cpp
+++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp
@@ -598,10 +598,26 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
     Attributes::FeatureMap::Get(endpoint, &featureMap);
     return featureMap;
 }
+
+uint16_t MediaPlaybackManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "MediaPlaybackManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/android/java/MediaPlaybackManager.h b/examples/tv-app/android/java/MediaPlaybackManager.h
index 0414a30..7af3381 100644
--- a/examples/tv-app/android/java/MediaPlaybackManager.h
+++ b/examples/tv-app/android/java/MediaPlaybackManager.h
@@ -104,6 +104,7 @@
     bool HandleDeactivateTextTrack() override;
 
     uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
 private:
     chip::JniGlobalReference mMediaPlaybackManagerObject;
@@ -121,5 +122,6 @@
     HandleMediaRequest(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds);
 
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 3;
+    static constexpr uint32_t kEndpointFeatureMap = 3;
+    static constexpr uint16_t kClusterRevision    = 2;
 };
diff --git a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp
index 1127d3a..532986f 100644
--- a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp
+++ b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp
@@ -17,6 +17,7 @@
  */
 
 #include "AccountLoginManager.h"
+#include <app-common/zap-generated/attributes/Accessors.h>
 #include <app/CommandHandler.h>
 #include <app/util/af.h>
 
@@ -64,3 +65,19 @@
     response.setupPIN = CharSpan::fromCharString(mSetupPin);
     helper.Success(response);
 }
+
+uint16_t AccountLoginManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "AccountLoginManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.h b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.h
index 4d6f537..805a3b3 100644
--- a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.h
+++ b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.h
@@ -46,7 +46,13 @@
         CopyString(setupPin, setupPinSize, mSetupPin);
     };
 
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
+
 protected:
     static const size_t kSetupPinSize = 12;
     char mSetupPin[kSetupPinSize];
+
+private:
+    // TODO: set this based upon meta data from app
+    static constexpr uint16_t kClusterRevision = 2;
 };
diff --git a/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp b/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp
index 6fc558d..82a278b 100644
--- a/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp
+++ b/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp
@@ -331,10 +331,26 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
     Attributes::FeatureMap::Get(endpoint, &featureMap);
     return featureMap;
 }
+
+uint16_t ChannelManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "ChannelManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/tv-common/clusters/channel/ChannelManager.h b/examples/tv-app/tv-common/clusters/channel/ChannelManager.h
index c0c28bb..5a9c0b6 100644
--- a/examples/tv-app/tv-common/clusters/channel/ChannelManager.h
+++ b/examples/tv-app/tv-common/clusters/channel/ChannelManager.h
@@ -63,6 +63,7 @@
                                    const chip::ByteSpan & data) override;
 
     uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
 protected:
     uint16_t mCurrentChannelIndex;
@@ -72,5 +73,6 @@
 
 private:
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 3;
+    static constexpr uint32_t kEndpointFeatureMap = 3;
+    static constexpr uint16_t kClusterRevision    = 2;
 };
diff --git a/examples/tv-app/tv-common/clusters/content-control/ContentController.cpp b/examples/tv-app/tv-common/clusters/content-control/ContentController.cpp
index 3d622e4..19317a7 100644
--- a/examples/tv-app/tv-common/clusters/content-control/ContentController.cpp
+++ b/examples/tv-app/tv-common/clusters/content-control/ContentController.cpp
@@ -96,7 +96,7 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
diff --git a/examples/tv-app/tv-common/clusters/content-control/ContentController.h b/examples/tv-app/tv-common/clusters/content-control/ContentController.h
index 719d42b..cc58a55 100644
--- a/examples/tv-app/tv-common/clusters/content-control/ContentController.h
+++ b/examples/tv-app/tv-common/clusters/content-control/ContentController.h
@@ -57,5 +57,5 @@
 protected:
 private:
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 3;
+    static constexpr uint32_t kEndpointFeatureMap = 3;
 };
diff --git a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp
index 013831e..572209a 100644
--- a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp
+++ b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp
@@ -198,10 +198,26 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
     Attributes::FeatureMap::Get(endpoint, &featureMap);
     return featureMap;
 }
+
+uint16_t ContentLauncherManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "ContentLauncherManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h
index 51c5b1a..2bc9e70 100644
--- a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h
+++ b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h
@@ -54,6 +54,7 @@
     uint32_t HandleGetSupportedStreamingProtocols() override;
 
     uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
 protected:
     std::list<std::string> mAcceptHeaderList;
@@ -62,5 +63,6 @@
 
 private:
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 3;
+    static constexpr uint32_t kEndpointFeatureMap = 3;
+    static constexpr uint16_t kClusterRevision    = 2;
 };
diff --git a/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.cpp b/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.cpp
index 5817f9a..3cec013 100644
--- a/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.cpp
+++ b/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.cpp
@@ -101,7 +101,7 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
diff --git a/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.h b/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.h
index 66d43ed..4a69489 100644
--- a/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.h
+++ b/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.h
@@ -34,5 +34,5 @@
 
 private:
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 7;
+    static constexpr uint32_t kEndpointFeatureMap = 7;
 };
diff --git a/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp b/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp
index 0bb3f13..f97a2e9 100644
--- a/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp
+++ b/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp
@@ -319,10 +319,26 @@
 {
     if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
     {
-        return mDynamicEndpointFeatureMap;
+        return kEndpointFeatureMap;
     }
 
     uint32_t featureMap = 0;
     Attributes::FeatureMap::Get(endpoint, &featureMap);
     return featureMap;
 }
+
+uint16_t MediaPlaybackManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "MediaPlaybackManager::GetClusterRevision error reading cluster revision");
+    }
+    return clusterRevision;
+}
diff --git a/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.h b/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.h
index e4582e6..82ee981 100644
--- a/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.h
+++ b/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.h
@@ -64,6 +64,7 @@
     bool HandleDeactivateTextTrack() override;
 
     uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
 protected:
     // NOTE: it does not make sense to have default state of playing with a speed of 0, but
@@ -112,5 +113,6 @@
 
 private:
     // TODO: set this based upon meta data from app
-    uint32_t mDynamicEndpointFeatureMap = 3;
+    static constexpr uint32_t kEndpointFeatureMap = 3;
+    static constexpr uint16_t kClusterRevision    = 2;
 };
diff --git a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp
index 9c0599e..0d3a155 100644
--- a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp
+++ b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp
@@ -16,6 +16,7 @@
  */
 
 #include "TargetNavigatorManager.h"
+#include <app-common/zap-generated/attributes/Accessors.h>
 
 using namespace std;
 using namespace chip::app;
@@ -66,3 +67,20 @@
     response.status = StatusEnum::kSuccess;
     helper.Success(response);
 }
+
+uint16_t TargetNavigatorManager::GetClusterRevision(chip::EndpointId endpoint)
+{
+    if (endpoint >= MATTER_DM_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
+    {
+        return kClusterRevision;
+    }
+
+    uint16_t clusterRevision = 0;
+    bool success             = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS);
+    if (!success)
+    {
+        ChipLogError(Zcl, "TargetNavigatorManager::GetClusterRevision error reading cluster revision");
+    }
+
+    return clusterRevision;
+}
diff --git a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.h b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.h
index 0294e75..d600f04 100644
--- a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.h
+++ b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.h
@@ -36,10 +36,15 @@
     uint8_t HandleGetCurrentTarget() override;
     void HandleNavigateTarget(CommandResponseHelper<NavigateTargetResponseType> & responser, const uint64_t & target,
                               const CharSpan & data) override;
+    uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
 
 protected:
     // NOTE: the ids for each target start at 1 so that we can reserve 0 as "no current target"
     static const uint8_t kNoCurrentTarget = 0;
     std::list<std::string> mTargets;
     uint8_t mCurrentTarget;
+
+private:
+    // TODO: set this based upon meta data from app
+    static constexpr uint16_t kClusterRevision = 2;
 };
diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter
index a2a6a08..ce8610e 100644
--- a/examples/tv-app/tv-common/tv-app.matter
+++ b/examples/tv-app/tv-common/tv-app.matter
@@ -3570,7 +3570,7 @@
     callback attribute lineup;
     callback attribute currentChannel;
     ram      attribute featureMap default = 0x0003;
-    ram      attribute clusterRevision default = 1;
+    ram      attribute clusterRevision default = 2;
 
     handle command ChangeChannel;
     handle command ChangeChannelResponse;
@@ -3587,7 +3587,7 @@
     callback attribute targetList;
     ram      attribute currentTarget default = 0;
     ram      attribute featureMap default = 0;
-    ram      attribute clusterRevision default = 1;
+    ram      attribute clusterRevision default = 2;
 
     handle command NavigateTarget;
     handle command NavigateTargetResponse;
@@ -3610,7 +3610,7 @@
     callback attribute acceptedCommandList;
     callback attribute attributeList;
     ram      attribute featureMap default = 0x003;
-    ram      attribute clusterRevision default = 1;
+    ram      attribute clusterRevision default = 2;
 
     handle command Play;
     handle command Pause;
@@ -3659,7 +3659,7 @@
     callback attribute acceptHeader;
     ram      attribute supportedStreamingProtocols;
     ram      attribute featureMap default = 0x0003;
-    ram      attribute clusterRevision default = 1;
+    ram      attribute clusterRevision default = 2;
 
     handle command LaunchContent;
     handle command LaunchURL;
@@ -3706,7 +3706,7 @@
     callback attribute eventList;
     callback attribute attributeList;
     ram      attribute featureMap default = 28;
-    ram      attribute clusterRevision default = 1;
+    ram      attribute clusterRevision default = 2;
 
     handle command UpdatePIN;
     handle command ResetPIN;
diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap
index 242fbba..bd7b526 100644
--- a/examples/tv-app/tv-common/tv-app.zap
+++ b/examples/tv-app/tv-common/tv-app.zap
@@ -4727,7 +4727,7 @@
               "storageOption": "External",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "",
+              "defaultValue": null,
               "reportable": 1,
               "minInterval": 1,
               "maxInterval": 65534,
@@ -4743,7 +4743,7 @@
               "storageOption": "External",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "",
+              "defaultValue": null,
               "reportable": 1,
               "minInterval": 1,
               "maxInterval": 65534,
@@ -4759,7 +4759,7 @@
               "storageOption": "External",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "",
+              "defaultValue": null,
               "reportable": 1,
               "minInterval": 1,
               "maxInterval": 65534,
@@ -4775,7 +4775,7 @@
               "storageOption": "External",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "",
+              "defaultValue": null,
               "reportable": 1,
               "minInterval": 1,
               "maxInterval": 65534,
@@ -4791,7 +4791,7 @@
               "storageOption": "External",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "",
+              "defaultValue": null,
               "reportable": 1,
               "minInterval": 1,
               "maxInterval": 65534,
@@ -4807,7 +4807,7 @@
               "storageOption": "External",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "",
+              "defaultValue": null,
               "reportable": 1,
               "minInterval": 1,
               "maxInterval": 65534,
@@ -5076,7 +5076,7 @@
               "storageOption": "RAM",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "1",
+              "defaultValue": "2",
               "reportable": 1,
               "minInterval": 0,
               "maxInterval": 65344,
@@ -5168,7 +5168,7 @@
               "storageOption": "RAM",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "1",
+              "defaultValue": "2",
               "reportable": 1,
               "minInterval": 0,
               "maxInterval": 65344,
@@ -5565,7 +5565,7 @@
               "storageOption": "RAM",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "1",
+              "defaultValue": "2",
               "reportable": 1,
               "minInterval": 1,
               "maxInterval": 65534,
@@ -5886,7 +5886,7 @@
               "storageOption": "RAM",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "1",
+              "defaultValue": "2",
               "reportable": 1,
               "minInterval": 0,
               "maxInterval": 65344,
@@ -6458,7 +6458,7 @@
               "storageOption": "RAM",
               "singleton": 0,
               "bounded": 0,
-              "defaultValue": "1",
+              "defaultValue": "2",
               "reportable": 1,
               "minInterval": 1,
               "maxInterval": 65534,
diff --git a/src/app/clusters/account-login-server/account-login-delegate.h b/src/app/clusters/account-login-server/account-login-delegate.h
index 0abf1de..8b8a1c4 100644
--- a/src/app/clusters/account-login-server/account-login-delegate.h
+++ b/src/app/clusters/account-login-server/account-login-delegate.h
@@ -44,6 +44,8 @@
                                    const chip::CharSpan & tempAccountIdentifierString)                                 = 0;
     virtual void GetSetupPin(char * setupPin, size_t setupPinSize, const chip::CharSpan & tempAccountIdentifierString) = 0;
 
+    virtual uint16_t GetClusterRevision(chip::EndpointId endpoint) = 0;
+
     virtual ~Delegate() = default;
 };
 
diff --git a/src/app/clusters/account-login-server/account-login-server.cpp b/src/app/clusters/account-login-server/account-login-server.cpp
index 9fc4b15..aa939ae 100644
--- a/src/app/clusters/account-login-server/account-login-server.cpp
+++ b/src/app/clusters/account-login-server/account-login-server.cpp
@@ -25,10 +25,13 @@
 #include <app/clusters/account-login-server/account-login-server.h>
 
 #include <app-common/zap-generated/cluster-objects.h>
+#include <app/AttributeAccessInterface.h>
 #include <app/CommandHandler.h>
 #include <app/ConcreteCommandPath.h>
 #include <app/EventLogging.h>
+#include <app/data-model/Encode.h>
 #include <app/util/af.h>
+#include <app/util/attribute-storage.h>
 #include <app/util/config.h>
 #include <platform/CHIPDeviceConfig.h>
 
@@ -112,6 +115,49 @@
 } // namespace chip
 
 // -----------------------------------------------------------------------------
+// Attribute Accessor Implementation
+
+namespace {
+
+class AccountLoginAttrAccess : public app::AttributeAccessInterface
+{
+public:
+    AccountLoginAttrAccess() : app::AttributeAccessInterface(Optional<EndpointId>::Missing(), AccountLogin::Id) {}
+
+    CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override;
+
+private:
+    CHIP_ERROR ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate);
+};
+
+AccountLoginAttrAccess gAccountLoginAttrAccess;
+
+CHIP_ERROR AccountLoginAttrAccess::Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder)
+{
+    EndpointId endpoint = aPath.mEndpointId;
+    Delegate * delegate = GetDelegate(endpoint);
+
+    switch (aPath.mAttributeId)
+    {
+    case app::Clusters::AccountLogin::Attributes::ClusterRevision::Id:
+        return ReadRevisionAttribute(endpoint, aEncoder, delegate);
+    default:
+        break;
+    }
+
+    return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR AccountLoginAttrAccess::ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder,
+                                                         Delegate * delegate)
+{
+    uint16_t clusterRevision = delegate->GetClusterRevision(endpoint);
+    return aEncoder.Encode(clusterRevision);
+}
+
+} // anonymous namespace
+
+// -----------------------------------------------------------------------------
 // Matter Framework Callbacks Implementation
 
 bool emberAfAccountLoginClusterGetSetupPINCallback(app::CommandHandler * command, const app::ConcreteCommandPath & commandPath,
@@ -212,4 +258,7 @@
 // -----------------------------------------------------------------------------
 // Plugin initialization
 
-void MatterAccountLoginPluginServerInitCallback() {}
+void MatterAccountLoginPluginServerInitCallback()
+{
+    registerAttributeAccessOverride(&gAccountLoginAttrAccess);
+}
diff --git a/src/app/clusters/application-basic-server/application-basic-server.cpp b/src/app/clusters/application-basic-server/application-basic-server.cpp
index ca78bc3..d0c63b3 100644
--- a/src/app/clusters/application-basic-server/application-basic-server.cpp
+++ b/src/app/clusters/application-basic-server/application-basic-server.cpp
@@ -170,30 +170,22 @@
 
     switch (aPath.mAttributeId)
     {
-    case chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id: {
+    case chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id:
         return ReadVendorNameAttribute(aEncoder, delegate);
-    }
-    case chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id: {
+    case chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id:
         return ReadVendorIdAttribute(aEncoder, delegate);
-    }
-    case chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id: {
+    case chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id:
         return ReadApplicationNameAttribute(aEncoder, delegate);
-    }
-    case chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id: {
+    case chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id:
         return ReadProductIdAttribute(aEncoder, delegate);
-    }
-    case chip::app::Clusters::ApplicationBasic::Attributes::Application::Id: {
+    case chip::app::Clusters::ApplicationBasic::Attributes::Application::Id:
         return ReadApplicationAttribute(aEncoder, delegate);
-    }
-    case chip::app::Clusters::ApplicationBasic::Attributes::Status::Id: {
+    case chip::app::Clusters::ApplicationBasic::Attributes::Status::Id:
         return ReadStatusAttribute(aEncoder, delegate);
-    }
-    case chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id: {
+    case chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id:
         return ReadApplicationVersionAttribute(aEncoder, delegate);
-    }
-    case chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id: {
+    case chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id:
         return ReadAllowedVendorListAttribute(aEncoder, delegate);
-    }
     default: {
         break;
     }
diff --git a/src/app/clusters/channel-server/channel-delegate.h b/src/app/clusters/channel-server/channel-delegate.h
index 6007bf0..c92ada4 100644
--- a/src/app/clusters/channel-server/channel-delegate.h
+++ b/src/app/clusters/channel-server/channel-delegate.h
@@ -64,7 +64,8 @@
                                            const chip::ByteSpan & data) = 0;
 
     bool HasFeature(chip::EndpointId endpoint, Feature feature);
-    virtual uint32_t GetFeatureMap(chip::EndpointId endpoint) = 0;
+    virtual uint32_t GetFeatureMap(chip::EndpointId endpoint)      = 0;
+    virtual uint16_t GetClusterRevision(chip::EndpointId endpoint) = 0;
 
     virtual ~Delegate() = default;
 };
diff --git a/src/app/clusters/channel-server/channel-server.cpp b/src/app/clusters/channel-server/channel-server.cpp
index af97765..13743d8 100644
--- a/src/app/clusters/channel-server/channel-server.cpp
+++ b/src/app/clusters/channel-server/channel-server.cpp
@@ -124,6 +124,7 @@
     CHIP_ERROR ReadLineupAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate);
     CHIP_ERROR ReadCurrentChannelAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate);
     CHIP_ERROR ReadFeatureFlagAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate);
+    CHIP_ERROR ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate);
 };
 
 ChannelAttrAccess gChannelAttrAccess;
@@ -167,10 +168,11 @@
 
         return ReadFeatureFlagAttribute(endpoint, aEncoder, delegate);
     }
-    default: {
+    case app::Clusters::Channel::Attributes::ClusterRevision::Id:
+        return ReadRevisionAttribute(endpoint, aEncoder, delegate);
+    default:
         break;
     }
-    }
 
     return CHIP_NO_ERROR;
 }
@@ -197,6 +199,12 @@
     return delegate->HandleGetCurrentChannel(aEncoder);
 }
 
+CHIP_ERROR ChannelAttrAccess::ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate)
+{
+    uint16_t clusterRevision = delegate->GetClusterRevision(endpoint);
+    return aEncoder.Encode(clusterRevision);
+}
+
 } // anonymous namespace
 
 // -----------------------------------------------------------------------------
diff --git a/src/app/clusters/content-launch-server/content-launch-delegate.h b/src/app/clusters/content-launch-server/content-launch-delegate.h
index 0f84887..8fcf705 100644
--- a/src/app/clusters/content-launch-server/content-launch-delegate.h
+++ b/src/app/clusters/content-launch-server/content-launch-delegate.h
@@ -53,7 +53,8 @@
     virtual uint32_t HandleGetSupportedStreamingProtocols() = 0;
 
     bool HasFeature(chip::EndpointId endpoint, Feature feature);
-    virtual uint32_t GetFeatureMap(chip::EndpointId endpoint) = 0;
+    virtual uint32_t GetFeatureMap(chip::EndpointId endpoint)      = 0;
+    virtual uint16_t GetClusterRevision(chip::EndpointId endpoint) = 0;
 
     virtual ~Delegate() = default;
 };
diff --git a/src/app/clusters/content-launch-server/content-launch-server.cpp b/src/app/clusters/content-launch-server/content-launch-server.cpp
index d9bba19..3b0a5d7 100644
--- a/src/app/clusters/content-launch-server/content-launch-server.cpp
+++ b/src/app/clusters/content-launch-server/content-launch-server.cpp
@@ -130,6 +130,7 @@
     CHIP_ERROR ReadAcceptHeaderAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate);
     CHIP_ERROR ReadSupportedStreamingProtocolsAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate);
     CHIP_ERROR ReadFeatureFlagAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate);
+    CHIP_ERROR ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate);
 };
 
 ContentLauncherAttrAccess gContentLauncherAttrAccess;
@@ -165,9 +166,11 @@
 
         return ReadFeatureFlagAttribute(endpoint, aEncoder, delegate);
     }
-    default: {
-        break;
+    case app::Clusters::ContentLauncher::Attributes::ClusterRevision::Id: {
+        return ReadRevisionAttribute(endpoint, aEncoder, delegate);
     }
+    default:
+        break;
     }
 
     return CHIP_NO_ERROR;
@@ -192,6 +195,13 @@
     return aEncoder.Encode(streamingProtocols);
 }
 
+CHIP_ERROR ContentLauncherAttrAccess::ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder,
+                                                            Delegate * delegate)
+{
+    uint16_t clusterRevision = delegate->GetClusterRevision(endpoint);
+    return aEncoder.Encode(clusterRevision);
+}
+
 } // anonymous namespace
 
 // -----------------------------------------------------------------------------
diff --git a/src/app/clusters/media-playback-server/media-playback-delegate.h b/src/app/clusters/media-playback-server/media-playback-delegate.h
index db60f89..12e89b2 100644
--- a/src/app/clusters/media-playback-server/media-playback-delegate.h
+++ b/src/app/clusters/media-playback-server/media-playback-delegate.h
@@ -70,7 +70,8 @@
     virtual bool HandleActivateTextTrack(const chip::CharSpan & trackId)                                    = 0;
     virtual bool HandleDeactivateTextTrack()                                                                = 0;
 
-    virtual uint32_t GetFeatureMap(chip::EndpointId endpoint) = 0;
+    virtual uint32_t GetFeatureMap(chip::EndpointId endpoint)      = 0;
+    virtual uint16_t GetClusterRevision(chip::EndpointId endpoint) = 0;
 
     virtual ~Delegate() = default;
 };
diff --git a/src/app/clusters/media-playback-server/media-playback-server.cpp b/src/app/clusters/media-playback-server/media-playback-server.cpp
index ee81133..9140cf5 100644
--- a/src/app/clusters/media-playback-server/media-playback-server.cpp
+++ b/src/app/clusters/media-playback-server/media-playback-server.cpp
@@ -139,6 +139,7 @@
     CHIP_ERROR ReadActiveTextTrackAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate);
     CHIP_ERROR ReadAvailableTextTracksAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate);
     CHIP_ERROR ReadFeatureFlagAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate);
+    CHIP_ERROR ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate);
 };
 
 MediaPlaybackAttrAccess gMediaPlaybackAttrAccess;
@@ -169,46 +170,35 @@
 
     switch (aPath.mAttributeId)
     {
-    case app::Clusters::MediaPlayback::Attributes::CurrentState::Id: {
+    case app::Clusters::MediaPlayback::Attributes::CurrentState::Id:
         return ReadCurrentStateAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::StartTime::Id: {
+    case app::Clusters::MediaPlayback::Attributes::StartTime::Id:
         return ReadStartTimeAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::Duration::Id: {
+    case app::Clusters::MediaPlayback::Attributes::Duration::Id:
         return ReadDurationAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::SampledPosition::Id: {
+    case app::Clusters::MediaPlayback::Attributes::SampledPosition::Id:
         return ReadSampledPositionAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id: {
+    case app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id:
         return ReadPlaybackSpeedAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id: {
+    case app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id:
         return ReadSeekRangeStartAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id: {
+    case app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id:
         return ReadSeekRangeEndAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::Id: {
+    case app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::Id:
         return ReadActiveAudioTrackAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::Id: {
+    case app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::Id:
         return ReadAvailableAudioTracksAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::Id: {
+    case app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::Id:
         return ReadActiveTextTrackAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::Id: {
+    case app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::Id:
         return ReadAvailableTextTracksAttribute(aEncoder, delegate);
-    }
-    case app::Clusters::ContentLauncher::Attributes::FeatureMap::Id: {
+    case app::Clusters::ContentLauncher::Attributes::FeatureMap::Id:
         return ReadFeatureFlagAttribute(endpoint, aEncoder, delegate);
-    }
-    default: {
+    case app::Clusters::AccountLogin::Attributes::ClusterRevision::Id:
+        return ReadRevisionAttribute(endpoint, aEncoder, delegate);
+    default:
         break;
     }
-    }
 
     return CHIP_NO_ERROR;
 }
@@ -220,6 +210,13 @@
     return aEncoder.Encode(featureFlag);
 }
 
+CHIP_ERROR MediaPlaybackAttrAccess::ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder,
+                                                          Delegate * delegate)
+{
+    uint16_t clusterRevision = delegate->GetClusterRevision(endpoint);
+    return aEncoder.Encode(clusterRevision);
+}
+
 CHIP_ERROR MediaPlaybackAttrAccess::ReadCurrentStateAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate)
 {
     MediaPlayback::PlaybackStateEnum currentState = delegate->HandleGetCurrentState();
diff --git a/src/app/clusters/messages-server/messages-server.cpp b/src/app/clusters/messages-server/messages-server.cpp
index 38cf972..2cca091 100644
--- a/src/app/clusters/messages-server/messages-server.cpp
+++ b/src/app/clusters/messages-server/messages-server.cpp
@@ -26,6 +26,7 @@
 {
     return true;
 }
+
 /**
  * @brief Messages Cluster CancelMessagesRequest Command callback (from client)
  */
diff --git a/src/app/clusters/target-navigator-server/target-navigator-delegate.h b/src/app/clusters/target-navigator-server/target-navigator-delegate.h
index 0dd47f5..f3be65c 100644
--- a/src/app/clusters/target-navigator-server/target-navigator-delegate.h
+++ b/src/app/clusters/target-navigator-server/target-navigator-delegate.h
@@ -40,6 +40,7 @@
     virtual uint8_t HandleGetCurrentTarget()                                          = 0;
     virtual void HandleNavigateTarget(CommandResponseHelper<Commands::NavigateTargetResponse::Type> & helper,
                                       const uint64_t & target, const CharSpan & data) = 0;
+    virtual uint16_t GetClusterRevision(chip::EndpointId endpoint)                    = 0;
 
     virtual ~Delegate() = default;
 };
diff --git a/src/app/clusters/target-navigator-server/target-navigator-server.cpp b/src/app/clusters/target-navigator-server/target-navigator-server.cpp
index 71d396a..a6c4d39 100644
--- a/src/app/clusters/target-navigator-server/target-navigator-server.cpp
+++ b/src/app/clusters/target-navigator-server/target-navigator-server.cpp
@@ -128,6 +128,7 @@
 private:
     CHIP_ERROR ReadTargetListAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate);
     CHIP_ERROR ReadCurrentTargetAttribute(app::AttributeValueEncoder & aEncoder, Delegate * delegate);
+    CHIP_ERROR ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder, Delegate * delegate);
 };
 
 TargetNavigatorAttrAccess gTargetNavigatorAttrAccess;
@@ -155,10 +156,11 @@
 
         return ReadCurrentTargetAttribute(aEncoder, delegate);
     }
-    default: {
+    case app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id:
+        return ReadRevisionAttribute(endpoint, aEncoder, delegate);
+    default:
         break;
     }
-    }
 
     return CHIP_NO_ERROR;
 }
@@ -174,6 +176,13 @@
     return aEncoder.Encode(currentTarget);
 }
 
+CHIP_ERROR TargetNavigatorAttrAccess::ReadRevisionAttribute(EndpointId endpoint, app::AttributeValueEncoder & aEncoder,
+                                                            Delegate * delegate)
+{
+    uint16_t clusterRevision = delegate->GetClusterRevision(endpoint);
+    return aEncoder.Encode(clusterRevision);
+}
+
 } // anonymous namespace
 
 // -----------------------------------------------------------------------------
diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml
index 8358513..25e6457 100644
--- a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml
+++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml
@@ -37,7 +37,7 @@
       command: "readAttribute"
       attribute: "ClusterRevision"
       response:
-          value: 1
+          value: 2
           constraints:
               type: int16u
 
diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml
index a89062e..fb0379c 100644
--- a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml
+++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml
@@ -36,7 +36,7 @@
       command: "readAttribute"
       attribute: "ClusterRevision"
       response:
-          value: 1
+          value: 2
           constraints:
               type: int16u
 
diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml
index 6dde4be..a30b8ce 100644
--- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml
+++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml
@@ -37,7 +37,7 @@
       command: "readAttribute"
       attribute: "ClusterRevision"
       response:
-          value: 1
+          value: 2
           constraints:
               type: int16u
 
diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml
index f1befc5..c3b55fd 100644
--- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml
+++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml
@@ -38,7 +38,7 @@
       command: "readAttribute"
       attribute: "ClusterRevision"
       response:
-          value: 1
+          value: 2
           constraints:
               type: int16u
 
diff --git a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml
index 925fd0a..55d7d29 100644
--- a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml
+++ b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml
@@ -37,7 +37,7 @@
       command: "readAttribute"
       attribute: "ClusterRevision"
       response:
-          value: 1
+          value: 2
           constraints:
               type: int16u
 
