mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +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
|
return
|
||||||
|
|
||||||
_LOGGER.warning(
|
_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),
|
", ".join(parts),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1238,9 +1238,9 @@ async def test_entity_service_call_warn_referenced(
|
|||||||
)
|
)
|
||||||
await service.entity_service_call(hass, {}, "", call)
|
await service.entity_service_call(hass, {}, "", call)
|
||||||
assert (
|
assert (
|
||||||
"Unable to find referenced areas non-existent-area, devices"
|
"Referenced areas non-existent-area, devices non-existent-device, "
|
||||||
" non-existent-device, entities non.existent" in caplog.text
|
"entities non.existent are missing or not currently available"
|
||||||
)
|
) in caplog.text
|
||||||
|
|
||||||
|
|
||||||
async def test_async_extract_entities_warn_referenced(
|
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)
|
extracted = await service.async_extract_entities(hass, {}, call)
|
||||||
assert len(extracted) == 0
|
assert len(extracted) == 0
|
||||||
assert (
|
assert (
|
||||||
"Unable to find referenced areas non-existent-area, devices"
|
"Referenced areas non-existent-area, devices non-existent-device, "
|
||||||
" non-existent-device, entities non.existent" in caplog.text
|
"entities non.existent are missing or not currently available"
|
||||||
)
|
) in caplog.text
|
||||||
|
|
||||||
|
|
||||||
async def test_async_extract_config_entry_ids(hass: HomeAssistant) -> None:
|
async def test_async_extract_config_entry_ids(hass: HomeAssistant) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user