Add fortigate deprecation message (#34854)

pull/34962/head
Thomas Le Gentil 2020-04-30 15:08:11 +02:00 committed by GitHub
parent a65edc8dc1
commit 29a05a6a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 12 deletions

View File

@ -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,
)