Force alias when importing notify PLATFORM_SCHEMA (#120494)

This commit is contained in:
epenet 2024-06-26 10:02:24 +02:00 committed by GitHub
parent 59959141af
commit 4bfecea2f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 102 additions and 84 deletions

View file

@ -8,7 +8,10 @@ import logging
from freesms import FreeClient
import voluptuous as vol
from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (
PLATFORM_SCHEMA as NOTIFY_PLATFORM_SCHEMA,
BaseNotificationService,
)
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_USERNAME
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
@ -16,7 +19,7 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
_LOGGER = logging.getLogger(__name__)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = NOTIFY_PLATFORM_SCHEMA.extend(
{vol.Required(CONF_USERNAME): cv.string, vol.Required(CONF_ACCESS_TOKEN): cv.string}
)