Skip to content
Snippets Groups Projects
Unverified Commit 8f9273e9 authored by Paulus Schoutsen's avatar Paulus Schoutsen Committed by GitHub
Browse files

Fix intent_type type (#117469)

parent d4d30f1c
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ def async_register(hass: HomeAssistant, handler: IntentHandler) -> None: ...@@ -67,7 +67,7 @@ def async_register(hass: HomeAssistant, handler: IntentHandler) -> None:
intents = {} intents = {}
hass.data[DATA_KEY] = 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: if handler.intent_type in intents:
_LOGGER.warning( _LOGGER.warning(
...@@ -717,7 +717,7 @@ def async_test_feature(state: State, feature: int, feature_name: str) -> None: ...@@ -717,7 +717,7 @@ def async_test_feature(state: State, feature: int, feature_name: str) -> None:
class IntentHandler: class IntentHandler:
"""Intent handler registration.""" """Intent handler registration."""
intent_type: str | None = None intent_type: str
slot_schema: vol.Schema | None = None slot_schema: vol.Schema | None = None
platforms: Iterable[str] | None = [] platforms: Iterable[str] | None = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment