Deprecate "wanted" sensor in radarr (#63818)

* Remove invalid "wanted" sensor from radarr

* uno mas
pull/66869/head^2
Robert Hillis 2022-02-21 13:12:09 -05:00 committed by GitHub
parent cd38878a4c
commit 14a7ee5d0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -138,10 +138,16 @@ def setup_platform(
) -> None:
"""Set up the Radarr platform."""
conditions = config[CONF_MONITORED_CONDITIONS]
# deprecated in 2022.3
if "wanted" in conditions:
_LOGGER.warning(
"Wanted is not a valid condition option. Please remove it from your config"
)
entities = [
RadarrSensor(hass, config, description)
for description in SENSOR_TYPES
if description.key in conditions
if description.key != "wanted"
]
add_entities(entities, True)