From 00e90736bdd5ef0eb552dc23867c9f9526b23729 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 15 May 2021 14:12:40 +0200 Subject: [PATCH] Deprecate Islamic Prayer Times YAML configuration (#50654) --- .../islamic_prayer_times/__init__.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/islamic_prayer_times/__init__.py b/homeassistant/components/islamic_prayer_times/__init__.py index 8fa2d1b04cb..8375b9d4c12 100644 --- a/homeassistant/components/islamic_prayer_times/__init__.py +++ b/homeassistant/components/islamic_prayer_times/__init__.py @@ -8,6 +8,7 @@ import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.exceptions import ConfigEntryNotReady +from homeassistant.helpers import config_validation as cv from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.event import async_call_later, async_track_point_in_time import homeassistant.util.dt as dt_util @@ -25,13 +26,16 @@ _LOGGER = logging.getLogger(__name__) PLATFORMS = ["sensor"] CONFIG_SCHEMA = vol.Schema( - { - DOMAIN: { - vol.Optional(CONF_CALC_METHOD, default=DEFAULT_CALC_METHOD): vol.In( - CALC_METHODS - ), - } - }, + vol.All( + cv.deprecated(DOMAIN), + { + DOMAIN: { + vol.Optional(CONF_CALC_METHOD, default=DEFAULT_CALC_METHOD): vol.In( + CALC_METHODS + ), + } + }, + ), extra=vol.ALLOW_EXTRA, )