File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ intents:
33 HassGetWeather :
44 data :
55 - sentences :
6- - " <what_is>[ the] weather[ like][( for| in| at) <name>]"
7- - " <what_is>[ the] weather[( for| in| at) <name>] like"
6+ - " <what_is>[ the] weather[ like]"
7+ - sentences :
8+ - " <what_is>[ the] weather[ like] (for|in|at) <name>"
9+ - " <what_is>[ the] weather (for|in|at) <name>[ like]"
810 - " <what_is>[ the] <name> weather[ like]"
911 requires_context :
1012 domain : weather
Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ def get_matched_states(
6161 if result .intent .name in ("HassClimateGetTemperature" , "HassClimateSetTemperature" ):
6262 # Match climate entities only
6363 states = [state for state in states if state .domain == "climate" ]
64+ elif result .intent .name in ("HassGetWeather" ,):
65+ # Match weather entities only
66+ states = [state for state in states if state .domain == "weather" ]
6467
6568 # Implement some matching logic from Home Assistant
6669 entity_name : Optional [str ] = None
Original file line number Diff line number Diff line change 11language : en
22tests :
3+ - sentences :
4+ - " what's the weather?"
5+ - " what is the weather like"
6+ intent :
7+ name : HassGetWeather
8+ response : 47 °F and raining
9+
310 - sentences :
411 - " what's the weather like in london?"
512 - " what is the weather in London like"
You can’t perform that action at this time.
0 commit comments