From 29a05a6a65be590ab83bccc702b95dd56fb65c51 Mon Sep 17 00:00:00 2001 From: Thomas Le Gentil <20202649+kifeo@users.noreply.github.com> Date: Thu, 30 Apr 2020 15:08:11 +0200 Subject: [PATCH] Add fortigate deprecation message (#34854) --- .../components/fortigate/__init__.py | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/homeassistant/components/fortigate/__init__.py b/homeassistant/components/fortigate/__init__.py index 6de55ae3d65..2dbd7ef45c0 100644 --- a/homeassistant/components/fortigate/__init__.py +++ b/homeassistant/components/fortigate/__init__.py @@ -21,18 +21,21 @@ DOMAIN = "fortigate" DATA_FGT = DOMAIN CONFIG_SCHEMA = vol.Schema( - { - DOMAIN: vol.Schema( - { - vol.Required(CONF_HOST): cv.string, - vol.Required(CONF_USERNAME): cv.string, - vol.Required(CONF_API_KEY): cv.string, - vol.Optional(CONF_DEVICES, default=[]): vol.All( - cv.ensure_list, [cv.string] - ), - } - ) - }, + vol.All( + cv.deprecated(DOMAIN, invalidation_version="0.112.0"), + { + DOMAIN: vol.Schema( + { + vol.Required(CONF_HOST): cv.string, + vol.Required(CONF_USERNAME): cv.string, + vol.Required(CONF_API_KEY): cv.string, + vol.Optional(CONF_DEVICES, default=[]): vol.All( + cv.ensure_list, [cv.string] + ), + } + ) + }, + ), extra=vol.ALLOW_EXTRA, )