1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +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

@@ -33,14 +33,14 @@ async def test_switch_generic_entity(
user_service=user_service,
states=states,
)
state = hass.states.get("switch.test_my_switch")
state = hass.states.get("switch.test_myswitch")
assert state is not None
assert state.state == STATE_ON
await hass.services.async_call(
SWITCH_DOMAIN,
SERVICE_TURN_ON,
{ATTR_ENTITY_ID: "switch.test_my_switch"},
{ATTR_ENTITY_ID: "switch.test_myswitch"},
blocking=True,
)
mock_client.switch_command.assert_has_calls([call(1, True)])
@@ -48,7 +48,7 @@ async def test_switch_generic_entity(
await hass.services.async_call(
SWITCH_DOMAIN,
SERVICE_TURN_OFF,
{ATTR_ENTITY_ID: "switch.test_my_switch"},
{ATTR_ENTITY_ID: "switch.test_myswitch"},
blocking=True,
)
mock_client.switch_command.assert_has_calls([call(1, False)])