From 8f9273e94531bca81db533c4f6fd1e9762665b3c Mon Sep 17 00:00:00 2001
From: Paulus Schoutsen <balloob@gmail.com>
Date: Wed, 15 May 2024 00:32:11 -0400
Subject: [PATCH] Fix intent_type type (#117469)

---
 homeassistant/helpers/intent.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/homeassistant/helpers/intent.py b/homeassistant/helpers/intent.py
index 4b835e2a65a..c46a506a2eb 100644
--- a/homeassistant/helpers/intent.py
+++ b/homeassistant/helpers/intent.py
@@ -67,7 +67,7 @@ def async_register(hass: HomeAssistant, handler: IntentHandler) -> None:
         intents = {}
         hass.data[DATA_KEY] = intents
 
-    assert handler.intent_type is not None, "intent_type cannot be None"
+    assert getattr(handler, "intent_type", None), "intent_type should be set"
 
     if handler.intent_type in intents:
         _LOGGER.warning(
@@ -717,7 +717,7 @@ def async_test_feature(state: State, feature: int, feature_name: str) -> None:
 class IntentHandler:
     """Intent handler registration."""
 
-    intent_type: str | None = None
+    intent_type: str
     slot_schema: vol.Schema | None = None
     platforms: Iterable[str] | None = []
 
-- 
GitLab