mirror of https://github.com/home-assistant/core
712 lines
15 KiB
Plaintext
712 lines
15 KiB
Plaintext
# serializer version: 1
|
|
# name: test_get_agent_list
|
|
dict({
|
|
'agents': list([
|
|
dict({
|
|
'id': 'conversation.home_assistant',
|
|
'name': 'Home Assistant',
|
|
'supported_languages': list([
|
|
'af',
|
|
'ar',
|
|
'bg',
|
|
'bn',
|
|
'ca',
|
|
'cs',
|
|
'da',
|
|
'de',
|
|
'de-CH',
|
|
'el',
|
|
'en',
|
|
'es',
|
|
'et',
|
|
'eu',
|
|
'fa',
|
|
'fi',
|
|
'fr',
|
|
'gl',
|
|
'gu',
|
|
'he',
|
|
'hi',
|
|
'hr',
|
|
'hu',
|
|
'id',
|
|
'is',
|
|
'it',
|
|
'ka',
|
|
'kn',
|
|
'ko',
|
|
'lb',
|
|
'lt',
|
|
'lv',
|
|
'ml',
|
|
'mn',
|
|
'ms',
|
|
'nb',
|
|
'nl',
|
|
'pl',
|
|
'pt',
|
|
'pt-br',
|
|
'ro',
|
|
'ru',
|
|
'sk',
|
|
'sl',
|
|
'sr',
|
|
'sv',
|
|
'sw',
|
|
'te',
|
|
'th',
|
|
'tr',
|
|
'uk',
|
|
'ur',
|
|
'vi',
|
|
'zh-cn',
|
|
'zh-hk',
|
|
'zh-tw',
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry',
|
|
'name': 'Mock Title',
|
|
'supported_languages': list([
|
|
'smurfish',
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry-support-all',
|
|
'name': 'Mock Title',
|
|
'supported_languages': '*',
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_get_agent_list.1
|
|
dict({
|
|
'agents': list([
|
|
dict({
|
|
'id': 'conversation.home_assistant',
|
|
'name': 'Home Assistant',
|
|
'supported_languages': list([
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry',
|
|
'name': 'Mock Title',
|
|
'supported_languages': list([
|
|
'smurfish',
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry-support-all',
|
|
'name': 'Mock Title',
|
|
'supported_languages': '*',
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_get_agent_list.2
|
|
dict({
|
|
'agents': list([
|
|
dict({
|
|
'id': 'conversation.home_assistant',
|
|
'name': 'Home Assistant',
|
|
'supported_languages': list([
|
|
'en',
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry',
|
|
'name': 'Mock Title',
|
|
'supported_languages': list([
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry-support-all',
|
|
'name': 'Mock Title',
|
|
'supported_languages': '*',
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_get_agent_list.3
|
|
dict({
|
|
'agents': list([
|
|
dict({
|
|
'id': 'conversation.home_assistant',
|
|
'name': 'Home Assistant',
|
|
'supported_languages': list([
|
|
'en',
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry',
|
|
'name': 'Mock Title',
|
|
'supported_languages': list([
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry-support-all',
|
|
'name': 'Mock Title',
|
|
'supported_languages': '*',
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_get_agent_list.4
|
|
dict({
|
|
'agents': list([
|
|
dict({
|
|
'id': 'conversation.home_assistant',
|
|
'name': 'Home Assistant',
|
|
'supported_languages': list([
|
|
'de',
|
|
'de-CH',
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry',
|
|
'name': 'Mock Title',
|
|
'supported_languages': list([
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry-support-all',
|
|
'name': 'Mock Title',
|
|
'supported_languages': '*',
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_get_agent_list.5
|
|
dict({
|
|
'agents': list([
|
|
dict({
|
|
'id': 'conversation.home_assistant',
|
|
'name': 'Home Assistant',
|
|
'supported_languages': list([
|
|
'de-CH',
|
|
'de',
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry',
|
|
'name': 'Mock Title',
|
|
'supported_languages': list([
|
|
]),
|
|
}),
|
|
dict({
|
|
'id': 'mock-entry-support-all',
|
|
'name': 'Mock Title',
|
|
'supported_languages': '*',
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_http_api_handle_failure
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'code': 'failed_to_handle',
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'error',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': 'An unexpected error occurred',
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_http_api_no_match
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'code': 'no_intent_match',
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'error',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': "Sorry, I couldn't understand that",
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_http_api_unexpected_failure
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'code': 'unknown',
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'error',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': 'An unexpected error occurred',
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_http_processing_intent[None]
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'failed': list([
|
|
]),
|
|
'success': list([
|
|
dict({
|
|
'id': 'light.kitchen',
|
|
'name': 'kitchen',
|
|
'type': 'entity',
|
|
}),
|
|
]),
|
|
'targets': list([
|
|
]),
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'action_done',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': 'Turned on the light',
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_http_processing_intent[conversation.home_assistant]
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'failed': list([
|
|
]),
|
|
'success': list([
|
|
dict({
|
|
'id': 'light.kitchen',
|
|
'name': 'kitchen',
|
|
'type': 'entity',
|
|
}),
|
|
]),
|
|
'targets': list([
|
|
]),
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'action_done',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': 'Turned on the light',
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_http_processing_intent[homeassistant]
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'failed': list([
|
|
]),
|
|
'success': list([
|
|
dict({
|
|
'id': 'light.kitchen',
|
|
'name': 'kitchen',
|
|
'type': 'entity',
|
|
}),
|
|
]),
|
|
'targets': list([
|
|
]),
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'action_done',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': 'Turned on the light',
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_ws_api[payload0]
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'code': 'no_intent_match',
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'error',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': "Sorry, I couldn't understand that",
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_ws_api[payload1]
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'code': 'no_intent_match',
|
|
}),
|
|
'language': 'test-language',
|
|
'response_type': 'error',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': "Sorry, I couldn't understand that",
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_ws_api[payload2]
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'code': 'no_intent_match',
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'error',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': "Sorry, I couldn't understand that",
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_ws_api[payload3]
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'code': 'no_intent_match',
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'error',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': "Sorry, I couldn't understand that",
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_ws_api[payload4]
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'code': 'no_intent_match',
|
|
}),
|
|
'language': 'test-language',
|
|
'response_type': 'error',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': "Sorry, I couldn't understand that",
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_ws_api[payload5]
|
|
dict({
|
|
'conversation_id': None,
|
|
'response': dict({
|
|
'card': dict({
|
|
}),
|
|
'data': dict({
|
|
'code': 'no_intent_match',
|
|
}),
|
|
'language': 'en',
|
|
'response_type': 'error',
|
|
'speech': dict({
|
|
'plain': dict({
|
|
'extra_data': None,
|
|
'speech': "Sorry, I couldn't understand that",
|
|
}),
|
|
}),
|
|
}),
|
|
})
|
|
# ---
|
|
# name: test_ws_hass_agent_debug
|
|
dict({
|
|
'results': list([
|
|
dict({
|
|
'details': dict({
|
|
'name': dict({
|
|
'name': 'name',
|
|
'text': 'my cool light',
|
|
'value': 'my cool light',
|
|
}),
|
|
}),
|
|
'intent': dict({
|
|
'name': 'HassTurnOn',
|
|
}),
|
|
'match': True,
|
|
'sentence_template': '<turn> on (<area> <name>|<name> [in <area>])',
|
|
'slots': dict({
|
|
'name': 'my cool light',
|
|
}),
|
|
'source': 'builtin',
|
|
'targets': dict({
|
|
'light.kitchen': dict({
|
|
'matched': True,
|
|
}),
|
|
}),
|
|
'unmatched_slots': dict({
|
|
}),
|
|
}),
|
|
dict({
|
|
'details': dict({
|
|
'name': dict({
|
|
'name': 'name',
|
|
'text': 'my cool light',
|
|
'value': 'my cool light',
|
|
}),
|
|
}),
|
|
'intent': dict({
|
|
'name': 'HassTurnOff',
|
|
}),
|
|
'match': True,
|
|
'sentence_template': '[<turn>] (<area> <name>|<name> [in <area>]) [to] off',
|
|
'slots': dict({
|
|
'name': 'my cool light',
|
|
}),
|
|
'source': 'builtin',
|
|
'targets': dict({
|
|
'light.kitchen': dict({
|
|
'matched': True,
|
|
}),
|
|
}),
|
|
'unmatched_slots': dict({
|
|
}),
|
|
}),
|
|
dict({
|
|
'details': dict({
|
|
'area': dict({
|
|
'name': 'area',
|
|
'text': 'kitchen',
|
|
'value': 'kitchen',
|
|
}),
|
|
'domain': dict({
|
|
'name': 'domain',
|
|
'text': '',
|
|
'value': 'light',
|
|
}),
|
|
}),
|
|
'intent': dict({
|
|
'name': 'HassTurnOn',
|
|
}),
|
|
'match': True,
|
|
'sentence_template': '<turn> on [all] <light> in <area>',
|
|
'slots': dict({
|
|
'area': 'kitchen',
|
|
'domain': 'light',
|
|
}),
|
|
'source': 'builtin',
|
|
'targets': dict({
|
|
'light.kitchen': dict({
|
|
'matched': True,
|
|
}),
|
|
}),
|
|
'unmatched_slots': dict({
|
|
}),
|
|
}),
|
|
dict({
|
|
'details': dict({
|
|
'area': dict({
|
|
'name': 'area',
|
|
'text': 'kitchen',
|
|
'value': 'kitchen',
|
|
}),
|
|
'domain': dict({
|
|
'name': 'domain',
|
|
'text': 'lights',
|
|
'value': 'light',
|
|
}),
|
|
'state': dict({
|
|
'name': 'state',
|
|
'text': 'on',
|
|
'value': 'on',
|
|
}),
|
|
}),
|
|
'intent': dict({
|
|
'name': 'HassGetState',
|
|
}),
|
|
'match': True,
|
|
'sentence_template': '[tell me] how many {on_off_domains:domain} (is|are) {on_off_states:state} [in <area>]',
|
|
'slots': dict({
|
|
'area': 'kitchen',
|
|
'domain': 'lights',
|
|
'state': 'on',
|
|
}),
|
|
'source': 'builtin',
|
|
'targets': dict({
|
|
'light.kitchen': dict({
|
|
'matched': False,
|
|
}),
|
|
}),
|
|
'unmatched_slots': dict({
|
|
}),
|
|
}),
|
|
None,
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_ws_hass_agent_debug_custom_sentence
|
|
dict({
|
|
'results': list([
|
|
dict({
|
|
'details': dict({
|
|
'beer_style': dict({
|
|
'name': 'beer_style',
|
|
'text': 'lager',
|
|
'value': 'lager',
|
|
}),
|
|
}),
|
|
'file': 'en/beer.yaml',
|
|
'intent': dict({
|
|
'name': 'OrderBeer',
|
|
}),
|
|
'match': True,
|
|
'sentence_template': "I'd like to order a {beer_style} [please]",
|
|
'slots': dict({
|
|
'beer_style': 'lager',
|
|
}),
|
|
'source': 'custom',
|
|
'targets': dict({
|
|
}),
|
|
'unmatched_slots': dict({
|
|
}),
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_ws_hass_agent_debug_null_result
|
|
dict({
|
|
'results': list([
|
|
None,
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_ws_hass_agent_debug_out_of_range
|
|
dict({
|
|
'results': list([
|
|
dict({
|
|
'details': dict({
|
|
'brightness': dict({
|
|
'name': 'brightness',
|
|
'text': '100',
|
|
'value': 100,
|
|
}),
|
|
'name': dict({
|
|
'name': 'name',
|
|
'text': 'test light',
|
|
'value': 'test light',
|
|
}),
|
|
}),
|
|
'intent': dict({
|
|
'name': 'HassLightSet',
|
|
}),
|
|
'match': True,
|
|
'sentence_template': '[<numeric_value_set>] <name> brightness [to] <brightness>',
|
|
'slots': dict({
|
|
'brightness': '100',
|
|
'name': 'test light',
|
|
}),
|
|
'source': 'builtin',
|
|
'targets': dict({
|
|
'light.demo_1234': dict({
|
|
'matched': True,
|
|
}),
|
|
}),
|
|
'unmatched_slots': dict({
|
|
}),
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_ws_hass_agent_debug_out_of_range.1
|
|
dict({
|
|
'results': list([
|
|
dict({
|
|
'details': dict({
|
|
'name': dict({
|
|
'name': 'name',
|
|
'text': 'test light',
|
|
'value': 'test light',
|
|
}),
|
|
}),
|
|
'intent': dict({
|
|
'name': 'HassLightSet',
|
|
}),
|
|
'match': False,
|
|
'sentence_template': '[<numeric_value_set>] <name> brightness [to] <brightness>',
|
|
'slots': dict({
|
|
'name': 'test light',
|
|
}),
|
|
'source': 'builtin',
|
|
'targets': dict({
|
|
}),
|
|
'unmatched_slots': dict({
|
|
'brightness': 1001,
|
|
}),
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|
|
# name: test_ws_hass_agent_debug_sentence_trigger
|
|
dict({
|
|
'results': list([
|
|
dict({
|
|
'match': True,
|
|
'sentence_template': 'hello[ world]',
|
|
'source': 'trigger',
|
|
}),
|
|
]),
|
|
})
|
|
# ---
|