Change name to entity_id Select platform error messages (#87962)

This commit is contained in:
G Johansson
2023-02-12 22:54:04 +01:00
committed by GitHub
parent 824a0475ae
commit 9008556457

View File

@@ -102,7 +102,7 @@ async def async_select_option(entity: SelectEntity, service_call: ServiceCall) -
"""Service call wrapper to set a new value."""
option = service_call.data[ATTR_OPTION]
if option not in entity.options:
raise ValueError(f"Option {option} not valid for {entity.name}")
raise ValueError(f"Option {option} not valid for {entity.entity_id}")
await entity.async_select_option(option)