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:
Jesse Hills 2024-08-09 21:43:02 +12:00 committed by GitHub
parent f8e1c2cfd4
commit 84d6f5ed07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 275 additions and 322 deletions

View file

@ -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,
)