Fix tuya cover lint checks (#2414)

This commit is contained in:
Otto Winter 2021-09-28 23:15:52 +02:00 committed by GitHub
parent c26ea7e4e0
commit 855c98d815
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,9 +19,7 @@ TuyaCover = tuya_ns.class_("TuyaCover", cover.Cover, cg.Component)
def validate_range(config):
if config[CONF_MIN_VALUE] > config[CONF_MAX_VALUE]:
raise cv.Invalid(
"min_value({}) cannot be greater than max_value({})".format(
config[CONF_MIN_VALUE], config[CONF_MAX_VALUE]
)
f"min_value ({config[CONF_MIN_VALUE]}) cannot be greater than max_value ({config[CONF_MAX_VALUE]})"
)
return config