mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Update log message when referenced entity not found (#95577)
* Update log message when referenced entity not found * Update homeassistant/helpers/service.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update test --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
cac6dc0eae
commit
e4f617e92e
@ -240,7 +240,7 @@ class SelectedEntities:
|
||||
return
|
||||
|
||||
_LOGGER.warning(
|
||||
"Unable to find referenced %s or it is/they are currently not available",
|
||||
"Referenced %s are missing or not currently available",
|
||||
", ".join(parts),
|
||||
)
|
||||
|
||||
|
@ -1238,9 +1238,9 @@ async def test_entity_service_call_warn_referenced(
|
||||
)
|
||||
await service.entity_service_call(hass, {}, "", call)
|
||||
assert (
|
||||
"Unable to find referenced areas non-existent-area, devices"
|
||||
" non-existent-device, entities non.existent" in caplog.text
|
||||
)
|
||||
"Referenced areas non-existent-area, devices non-existent-device, "
|
||||
"entities non.existent are missing or not currently available"
|
||||
) in caplog.text
|
||||
|
||||
|
||||
async def test_async_extract_entities_warn_referenced(
|
||||
@ -1259,9 +1259,9 @@ async def test_async_extract_entities_warn_referenced(
|
||||
extracted = await service.async_extract_entities(hass, {}, call)
|
||||
assert len(extracted) == 0
|
||||
assert (
|
||||
"Unable to find referenced areas non-existent-area, devices"
|
||||
" non-existent-device, entities non.existent" in caplog.text
|
||||
)
|
||||
"Referenced areas non-existent-area, devices non-existent-device, "
|
||||
"entities non.existent are missing or not currently available"
|
||||
) in caplog.text
|
||||
|
||||
|
||||
async def test_async_extract_config_entry_ids(hass: HomeAssistant) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user