Fix mixed case service schema registration (#96448)

This commit is contained in:
J. Nick Koston 2023-07-12 14:39:51 -10:00 committed by GitHub
parent 7009683226
commit 08af42b00e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 1 deletions

View file

@ -701,6 +701,9 @@ def async_set_service_schema(
hass: HomeAssistant, domain: str, service: str, schema: dict[str, Any]
) -> None:
"""Register a description for a service."""
domain = domain.lower()
service = service.lower()
descriptions_cache: dict[
tuple[str, str], dict[str, Any] | None
] = hass.data.setdefault(SERVICE_DESCRIPTION_CACHE, {})