hass-core/tests/helpers
CtrlZvi 1433cdaa12
Prefer shorter keys for intent matching (#43672)
When using fuzzy matching to match entity names for intents, whichever
entity is first is preferred in the case of equal matches. This leads
to situations where entities with similar names (such as entities named
for their area and then specific area location) may be used when the
whole area is wanted.

I ran into this with the my Phillips Hue lights. I have each individual
light named such that its room is the first part of the name, and its
location within the room after. So my living room has:
Living Room West
Living Room Northwest
Living Room North
Living Room Northeast

I then have a group for the whole room:
Living Room

Because the group is the last of the entities, trying to adjust the
whole room only activates one light, because all of the lights match
equally well.

By preferring the shortest of equal matches, we prefer keys that have
the least amount of extra information, causing "Living Room" to match
the group instead of an individual light.
2021-01-27 12:16:19 +01:00
..
__init__.py Fix PEP257 issues 2016-03-09 11:15:04 +01:00
test_aiohttp_client.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_area_registry.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_check_config.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_collection.py Gather all collection listeners and changes at the same time (#42497) 2020-10-29 10:06:55 +01:00
test_condition.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_config_entry_flow.py Add support for discovery via DHCP (#45087) 2021-01-14 09:09:08 +01:00
test_config_entry_oauth2_flow.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_config_validation.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_debounce.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_deprecation.py Changes to filename and path validation (#45529) 2021-01-26 15:53:21 +01:00
test_device_registry.py Make DeviceRegistry.async_get_device connections arg optional (#44897) 2021-01-07 13:49:45 +01:00
test_discovery.py Mark config dependency of frontend (#36587) 2020-06-09 23:27:47 -07:00
test_dispatcher.py Fail tests if wrapped callbacks or coroutines throw (#35010) 2020-05-06 14:14:57 -07:00
test_entity.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_entity_component.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_entity_platform.py Make DeviceRegistry.async_get_device connections arg optional (#44897) 2021-01-07 13:49:45 +01:00
test_entity_registry.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_entity_values.py Sort imports according to PEP8 for 'tests' (#29791) 2019-12-09 16:52:24 +01:00
test_entityfilter.py Add support for glob matching to entity filters (#36913) 2020-06-23 20:02:29 -05:00
test_event.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_frame.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_httpx_client.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_icon.py StarLine integration (#27197) 2019-11-26 11:17:11 -08:00
test_init.py Use set literals in tests (#33669) 2020-04-05 02:20:09 +02:00
test_instance_id.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_integration_platform.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_intent.py Prefer shorter keys for intent matching (#43672) 2021-01-27 12:16:19 +01:00
test_json.py Black 2019-07-31 12:25:30 -07:00
test_location.py Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
test_network.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_ratelimit.py Implement template rate_limit directive (#40667) 2020-10-01 21:39:44 +02:00
test_reload.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_restore_state.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_script.py Fix test_wait_template_with_utcnow (#45356) 2021-01-20 23:56:00 +01:00
test_script_variables.py Add native Python types support to templates (#41227) 2020-10-07 00:05:52 +02:00
test_selector.py Add selectors for text and arbitrary objects (#45112) 2021-01-27 09:20:19 +01:00
test_service.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_significant_change.py Add "significant change" base (#45555) 2021-01-26 14:13:27 +01:00
test_singleton.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_state.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_storage.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_storage_remove.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_sun.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_system_info.py Black 2019-07-31 12:25:30 -07:00
test_temperature.py Various string cleanups (#30435) 2020-01-03 14:47:06 +01:00
test_template.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_translation.py Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
test_trigger.py Reorganize trigger code (#38655) 2020-08-17 11:54:56 -05:00
test_update_coordinator.py Stop update_coordinator schedule refresh when HA is stopping (#45338) 2021-01-22 00:23:50 +01:00