From 281a9f042be23a31d72509f1acd697c837e02db8 Mon Sep 17 00:00:00 2001
From: Joost Lekkerkerker <joostlek@outlook.com>
Date: Thu, 22 Aug 2024 21:01:48 +0200
Subject: [PATCH] Check minimum amount of integrations for a brand (#124310)

---
 script/hassfest/brand.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/script/hassfest/brand.py b/script/hassfest/brand.py
index fe47d31067a..6139e12393e 100644
--- a/script/hassfest/brand.py
+++ b/script/hassfest/brand.py
@@ -18,6 +18,8 @@ BRAND_SCHEMA = vol.Schema(
     }
 )
 
+BRAND_EXCEPTIONS = ["u_tec"]
+
 
 def _validate_brand(
     brand: Brand, integrations: dict[str, Integration], config: Config
@@ -38,10 +40,14 @@ def _validate_brand(
             f"Domain '{brand.domain}' does not match file name {brand.path.name}",
         )
 
-    if not brand.integrations and not brand.iot_standards:
+    if (
+        len(brand.integrations) < 2
+        and not brand.iot_standards
+        and brand.domain not in BRAND_EXCEPTIONS
+    ):
         config.add_error(
             "brand",
-            f"{brand.path.name}: At least one of integrations or "
+            f"{brand.path.name}: At least two integrations or "
             "iot_standards must be non-empty",
         )
 
-- 
GitLab