Deprecate hide_if_away from device_tracker (#30833)

pull/30849/head
Franck Nijhof 2020-01-16 19:31:00 +01:00 committed by Paulus Schoutsen
parent 04b7d9e848
commit 8861c80068
2 changed files with 26 additions and 20 deletions

View File

@ -53,12 +53,15 @@ SOURCE_TYPES = (
NEW_DEVICE_DEFAULTS_SCHEMA = vol.Any(
None,
vol.All(
cv.deprecated(CONF_AWAY_HIDE, invalidation_version="0.107.0"),
vol.Schema(
{
vol.Optional(CONF_TRACK_NEW, default=DEFAULT_TRACK_NEW): cv.boolean,
vol.Optional(CONF_AWAY_HIDE, default=DEFAULT_AWAY_HIDE): cv.boolean,
}
),
),
)
PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA.extend(
{

View File

@ -528,7 +528,9 @@ async def async_load_config(
This method is a coroutine.
"""
dev_schema = vol.Schema(
dev_schema = vol.All(
cv.deprecated(CONF_AWAY_HIDE, invalidation_version="0.107.0"),
vol.Schema(
{
vol.Required(CONF_NAME): cv.string,
vol.Optional(CONF_ICON, default=None): vol.Any(None, cv.icon),
@ -543,6 +545,7 @@ async def async_load_config(
cv.time_period, cv.positive_timedelta
),
}
),
)
result = []
try: