1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Report error code in log when command fails (#74319)

This commit is contained in:
atlflyer
2022-07-02 09:58:08 -04:00
committed by GitHub
parent 255c3c5b9a
commit da11cef29a
8 changed files with 59 additions and 7 deletions

View File

@@ -155,7 +155,7 @@ async def test_reload(hass: HomeAssistant) -> None:
async def test_move_cover_failure(
caplog: LogCaptureFixture, hass: HomeAssistant
) -> None:
"""Test with state value."""
"""Test command failure."""
await setup_test_entity(
hass,
@@ -165,6 +165,7 @@ async def test_move_cover_failure(
DOMAIN, SERVICE_OPEN_COVER, {ATTR_ENTITY_ID: "cover.test"}, blocking=True
)
assert "Command failed" in caplog.text
assert "return code 1" in caplog.text
async def test_unique_id(hass: HomeAssistant) -> None: