Remove ESPHome legacy entity naming (#123436)
* Remove ESPHome legacy entity naming * Update test entity_ids to use sanitized name instead of object_id
This commit is contained in:
parent
f8e1c2cfd4
commit
84d6f5ed07
23 changed files with 275 additions and 322 deletions
|
@ -464,7 +464,7 @@ async def test_generic_device_update_entity(
|
|||
user_service=user_service,
|
||||
states=states,
|
||||
)
|
||||
state = hass.states.get("update.test_myupdate")
|
||||
state = hass.states.get("update.test_my_update")
|
||||
assert state is not None
|
||||
assert state.state == STATE_OFF
|
||||
|
||||
|
@ -503,14 +503,14 @@ async def test_generic_device_update_entity_has_update(
|
|||
user_service=user_service,
|
||||
states=states,
|
||||
)
|
||||
state = hass.states.get("update.test_myupdate")
|
||||
state = hass.states.get("update.test_my_update")
|
||||
assert state is not None
|
||||
assert state.state == STATE_ON
|
||||
|
||||
await hass.services.async_call(
|
||||
UPDATE_DOMAIN,
|
||||
SERVICE_INSTALL,
|
||||
{ATTR_ENTITY_ID: "update.test_myupdate"},
|
||||
{ATTR_ENTITY_ID: "update.test_my_update"},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
|
@ -528,7 +528,7 @@ async def test_generic_device_update_entity_has_update(
|
|||
)
|
||||
)
|
||||
|
||||
state = hass.states.get("update.test_myupdate")
|
||||
state = hass.states.get("update.test_my_update")
|
||||
assert state is not None
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes["in_progress"] == 50
|
||||
|
@ -536,7 +536,7 @@ async def test_generic_device_update_entity_has_update(
|
|||
await hass.services.async_call(
|
||||
HOMEASSISTANT_DOMAIN,
|
||||
SERVICE_UPDATE_ENTITY,
|
||||
{ATTR_ENTITY_ID: "update.test_myupdate"},
|
||||
{ATTR_ENTITY_ID: "update.test_my_update"},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue