Remove lower call in async_reserve (#143682)

async_reserve is only called from the the entity_platform helper
which already ensures the entity_id is validated and in lower
case.
a783b6a0ab/homeassistant/helpers/entity_platform.py (L936)
This commit is contained in:
J. Nick Koston 2025-04-25 15:12:55 -10:00 committed by GitHub
parent 7074331461
commit 03950f270a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2234,7 +2234,6 @@ class StateMachine:
This avoids a race condition where multiple entities with the same
entity_id are added.
"""
entity_id = entity_id.lower()
if entity_id in self._states_data or entity_id in self._reservations:
raise HomeAssistantError(
"async_reserve must not be called once the state is in the state"