Fix intent_type type (#117469)

pull/117471/head
Paulus Schoutsen 2024-05-15 00:32:11 -04:00 committed by GitHub
parent d4d30f1c46
commit 8f9273e945
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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 = []