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.
https://github.com/home-assistant/core/blob/a783b6a0abda02b26e193356c4f3db8b86e13b86/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
-1
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"