mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Use the ESPHome object_id to suggest the entity id (#95852)
This commit is contained in:
@@ -34,14 +34,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)])
|
||||
@@ -49,7 +49,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)])
|
||||
|
||||
Reference in New Issue
Block a user