1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-26 22:18:40 +00:00

Revert "Remove ESPHome legacy entity naming" (#123453)

This commit is contained in:
Franck Nijhof
2024-08-10 18:38:20 +02:00
committed by GitHub
parent ef2ddbf86d
commit 0558c85b5d
23 changed files with 322 additions and 275 deletions

View File

@@ -53,7 +53,7 @@ async def test_camera_single_image(
user_service=user_service,
states=states,
)
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_IDLE
@@ -63,9 +63,9 @@ async def test_camera_single_image(
mock_client.request_single_image = _mock_camera_image
client = await hass_client()
resp = await client.get("/api/camera_proxy/camera.test_my_camera")
resp = await client.get("/api/camera_proxy/camera.test_mycamera")
await hass.async_block_till_done()
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_IDLE
@@ -101,15 +101,15 @@ async def test_camera_single_image_unavailable_before_requested(
user_service=user_service,
states=states,
)
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_IDLE
await mock_device.mock_disconnect(False)
client = await hass_client()
resp = await client.get("/api/camera_proxy/camera.test_my_camera")
resp = await client.get("/api/camera_proxy/camera.test_mycamera")
await hass.async_block_till_done()
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_UNAVAILABLE
@@ -142,7 +142,7 @@ async def test_camera_single_image_unavailable_during_request(
user_service=user_service,
states=states,
)
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_IDLE
@@ -152,9 +152,9 @@ async def test_camera_single_image_unavailable_during_request(
mock_client.request_single_image = _mock_camera_image
client = await hass_client()
resp = await client.get("/api/camera_proxy/camera.test_my_camera")
resp = await client.get("/api/camera_proxy/camera.test_mycamera")
await hass.async_block_till_done()
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_UNAVAILABLE
@@ -187,7 +187,7 @@ async def test_camera_stream(
user_service=user_service,
states=states,
)
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_IDLE
remaining_responses = 3
@@ -203,9 +203,9 @@ async def test_camera_stream(
mock_client.request_single_image = _mock_camera_image
client = await hass_client()
resp = await client.get("/api/camera_proxy_stream/camera.test_my_camera")
resp = await client.get("/api/camera_proxy_stream/camera.test_mycamera")
await hass.async_block_till_done()
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_IDLE
@@ -247,16 +247,16 @@ async def test_camera_stream_unavailable(
user_service=user_service,
states=states,
)
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_IDLE
await mock_device.mock_disconnect(False)
client = await hass_client()
await client.get("/api/camera_proxy_stream/camera.test_my_camera")
await client.get("/api/camera_proxy_stream/camera.test_mycamera")
await hass.async_block_till_done()
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_UNAVAILABLE
@@ -287,7 +287,7 @@ async def test_camera_stream_with_disconnection(
user_service=user_service,
states=states,
)
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_IDLE
remaining_responses = 3
@@ -305,8 +305,8 @@ async def test_camera_stream_with_disconnection(
mock_client.request_single_image = _mock_camera_image
client = await hass_client()
await client.get("/api/camera_proxy_stream/camera.test_my_camera")
await client.get("/api/camera_proxy_stream/camera.test_mycamera")
await hass.async_block_till_done()
state = hass.states.get("camera.test_my_camera")
state = hass.states.get("camera.test_mycamera")
assert state is not None
assert state.state == STATE_UNAVAILABLE