1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Fix exposure checks on some intents (#118988)

* Check exposure in climate intent

* Check exposure in todo list

* Check exposure for weather

* Check exposure in humidity intents

* Add extra checks to weather tests

* Add more checks to todo intent test

* Move climate intents to async_match_targets

* Update test_intent.py

* Update test_intent.py

* Remove patch
This commit is contained in:
Michael Hansen
2024-06-06 20:41:25 -05:00
committed by GitHub
parent 8c025ea1f7
commit 87114bf19b
9 changed files with 453 additions and 205 deletions

View File

@@ -712,6 +712,7 @@ def async_match_states(
domains: Collection[str] | None = None,
device_classes: Collection[str] | None = None,
states: list[State] | None = None,
assistant: str | None = None,
) -> Iterable[State]:
"""Simplified interface to async_match_targets that returns states matching the constraints."""
result = async_match_targets(
@@ -722,6 +723,7 @@ def async_match_states(
floor_name=floor_name,
domains=domains,
device_classes=device_classes,
assistant=assistant,
),
states=states,
)